projects
/
dotfiles
/
.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
.gitignore added
[dotfiles/.git]
/
.config
/
coc
/
extensions
/
node_modules
/
coc-prettier
/
node_modules
/
unist-util-remove-position
/
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
}