This commit is contained in:
18
node_modules/unist-util-remove-position/index.js
generated
vendored
Normal file
18
node_modules/unist-util-remove-position/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict'
|
||||
|
||||
var visit = require('unist-util-visit')
|
||||
|
||||
module.exports = removePosition
|
||||
|
||||
function removePosition(node, force) {
|
||||
visit(node, force ? hard : soft)
|
||||
return node
|
||||
}
|
||||
|
||||
function hard(node) {
|
||||
delete node.position
|
||||
}
|
||||
|
||||
function soft(node) {
|
||||
node.position = undefined
|
||||
}
|
||||
Reference in New Issue
Block a user