19 lines
279 B
JavaScript
Raw Normal View History

2020-05-19 11:43:42 +03:00
'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
}