Skip to content

Commit

Permalink
Remove dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed May 10, 2018
1 parent dae44f3 commit f122573
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
5 changes: 2 additions & 3 deletions lib/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ var fault = require('fault')
var xtend = require('xtend')
var object = require('is-object')
var string = require('x-is-string')
var func = require('x-is-function')
var FindUp = require('./find-up')

module.exports = Config
Expand Down Expand Up @@ -202,7 +201,7 @@ function merge(target, raw, val, options) {
function use(usable, value) {
if (string(usable)) {
addModule(usable, value)
} else if (func(usable)) {
} else if (typeof usable === 'function') {
addPlugin(usable, value)
} else {
merge(target, usable, value, options)
Expand All @@ -225,7 +224,7 @@ function merge(target, raw, val, options) {
}

try {
if (func(res)) {
if (typeof res === 'function') {
addPlugin(res, value)
} else {
merge(target, res, value, xtend(options, {root: dirname(fp)}))
Expand Down
3 changes: 1 addition & 2 deletions lib/file-pipeline/queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

var debug = require('debug')('unified-engine:file-pipeline:queue')
var stats = require('vfile-statistics')
var func = require('x-is-function')

module.exports = queue

Expand Down Expand Up @@ -41,7 +40,7 @@ function queue(context, file, fileSet, next) {
return
}

if (func(map[key])) {
if (typeof map[key] === 'function') {
debug('`%s` can be flushed', key)
} else {
debug('Interupting flush: `%s` is not finished', key)
Expand Down
3 changes: 1 addition & 2 deletions lib/find-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var fs = require('fs')
var path = require('path')
var fault = require('fault')
var debug = require('debug')('unified-engine:find-up')
var func = require('x-is-function')
var object = require('is-object')

module.exports = FindUp
Expand Down Expand Up @@ -178,7 +177,7 @@ function load(filePath, callback) {
}

function apply(cb, result) {
if (object(result) && func(result[0])) {
if (object(result) && typeof result[0] === 'function') {
result.push(cb)
} else if (result instanceof Error) {
cb(result)
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"unist-util-inspect": "^4.1.2",
"vfile-reporter": "^5.0.0",
"vfile-statistics": "^1.1.0",
"x-is-function": "^1.0.4",
"x-is-string": "^0.1.0",
"xtend": "^4.0.1"
},
Expand Down

0 comments on commit f122573

Please sign in to comment.