Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit e24fc37

Browse files
author
Alan Shaw
committed
refactor: use typeof instead of lodash/isString
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent f9b4fa2 commit e24fc37

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/core/runtime/add-from-fs-nodejs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
const promisify = require('promisify-es6')
44
const pull = require('pull-stream')
55
const globSource = require('../../utils/files/glob-source')
6-
const isString = require('lodash/isString')
76

87
module.exports = self => {
98
return promisify((...args) => {
109
const callback = args.pop()
11-
const options = isString(args[args.length - 1]) ? {} : args.pop()
10+
const options = typeof args[args.length - 1] === 'string' ? {} : args.pop()
1211
const paths = args
1312

1413
pull(

src/utils/files/glob-source.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const fs = require('fs')
44
const Path = require('path')
5-
const isString = require('lodash/isString')
65
const pull = require('pull-stream')
76
const glob = require('glob')
87
const cat = require('pull-cat')
@@ -25,7 +24,7 @@ const errCode = require('err-code')
2524
* @returns {Function} pull stream source
2625
*/
2726
module.exports = (...args) => {
28-
const options = isString(args[args.length - 1]) ? {} : args.pop()
27+
const options = typeof args[args.length - 1] === 'string' ? {} : args.pop()
2928
const paths = args
3029
const deferred = defer.source()
3130

0 commit comments

Comments
 (0)