projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
096395981793d9a80390db8cca466529026b5475
[dotfiles/.git]
/
index.js
1
'use strict'
2
3
var visit = require('unist-util-visit')
4
5
module.exports = removePosition
6
7
function removePosition(node, force) {
8
visit(node, force ? hard : soft)
9
return node
10
}
11
12
function hard(node) {
13
delete node.position
14
}
15
16
function soft(node) {
17
node.position = undefined
18
}