Skip to content

Commit 75475f4

Browse files
committed
Remove xtend dependency
1 parent e623ab2 commit 75475f4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
module.exports = toHast
44

5-
var xtend = require('xtend')
65
var u = require('unist-builder')
76
var visit = require('unist-util-visit')
87
var position = require('unist-util-position')
@@ -25,7 +24,7 @@ function factory(tree, options) {
2524
h.footnoteById = footnoteById
2625
h.footnoteOrder = []
2726
h.augment = augment
28-
h.handlers = xtend(handlers, settings.handlers || {})
27+
h.handlers = Object.assign({}, handlers, settings.handlers)
2928

3029
visit(tree, 'footnoteDefinition', onfootnotedefinition)
3130

@@ -45,7 +44,7 @@ function factory(tree, options) {
4544
}
4645

4746
if (right.type === 'element' && data.hProperties) {
48-
right.properties = xtend(right.properties, data.hProperties)
47+
right.properties = Object.assign({}, right.properties, data.hProperties)
4948
}
5049

5150
if (right.children && data.hChildren) {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
"unist-builder": "^1.0.1",
3232
"unist-util-generated": "^1.1.0",
3333
"unist-util-position": "^3.0.0",
34-
"unist-util-visit": "^1.1.0",
35-
"xtend": "^4.0.1"
34+
"unist-util-visit": "^1.1.0"
3635
},
3736
"devDependencies": {
3837
"browserify": "^16.0.0",

0 commit comments

Comments
 (0)