Skip to content

Commit

Permalink
Remove dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 14, 2019
1 parent 133fa05 commit 15a052a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions index.js
Expand Up @@ -4,7 +4,6 @@ var extend = require('extend')
var bail = require('bail')
var vfile = require('vfile')
var trough = require('trough')
var string = require('x-is-string')
var plain = require('is-plain-obj')

// Expose a frozen processor.
Expand Down Expand Up @@ -131,7 +130,7 @@ function unified() {

// Data management. Getter / setter for processor-specific informtion.
function data(key, value) {
if (string(key)) {
if (typeof key === 'string') {
// Set `key`.
if (arguments.length === 2) {
assertUnfrozen('data', frozen)
Expand Down Expand Up @@ -441,7 +440,7 @@ function assertUnfrozen(name, frozen) {

// Assert `node` is a unist node.
function assertNode(node) {
if (!node || !string(node.type)) {
if (!node || typeof node.type !== 'string') {
throw new Error('Expected node, got `' + node + '`')
}
}
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -38,8 +38,7 @@
"extend": "^3.0.0",
"is-plain-obj": "^2.0.0",
"trough": "^1.0.0",
"vfile": "^4.0.0",
"x-is-string": "^0.1.0"
"vfile": "^4.0.0"
},
"devDependencies": {
"browserify": "^16.0.0",
Expand Down

0 comments on commit 15a052a

Please sign in to comment.