diff --git a/configure/request-next.js b/configure/request-next.js index 490d472..fd3d80b 100644 --- a/configure/request-next.js +++ b/configure/request-next.js @@ -1,9 +1,9 @@ 'use strict'; var core = require('../'), - isArray = require('lodash/isArray'), - isFunction = require('lodash/isFunction'), - isObjectLike = require('lodash/isObjectLike'); + isArray = Array.isArray, + isFunction = require('lodash.isfunction'), + isObjectLike = require('lodash.isobjectlike'); module.exports = function (options) { diff --git a/configure/request2.js b/configure/request2.js index 0cba240..5979f63 100644 --- a/configure/request2.js +++ b/configure/request2.js @@ -1,9 +1,9 @@ 'use strict'; var core = require('../'), - isArray = require('lodash/isArray'), - isFunction = require('lodash/isFunction'), - isObjectLike = require('lodash/isObjectLike'); + isArray = Array.isArray, + isFunction = require('lodash.isfunction'), + isObjectLike = require('lodash.isobjectlike'); module.exports = function (options) { diff --git a/gulpfile.js b/gulpfile.js index 77a38a5..383d77c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,7 +8,7 @@ var chalk = require('chalk'); var rimraf = require('rimraf'); var coveralls = require('gulp-coveralls'); var eslint = require('gulp-eslint'); -var _ = require('lodash'); +var flatten = require('lodash.flatten'); var chai = require('chai'); global.expect = chai.expect; @@ -27,7 +27,7 @@ gulp.task('dev', ['watch', 'validate']); gulp.task('watch', function () { - gulp.watch(_.flatten([ + gulp.watch(flatten([ paths.libJsFiles, paths.specFiles, paths.fixtureFiles, @@ -36,7 +36,7 @@ gulp.task('watch', function () { 'validate' ]); - gulp.watch(_.flatten([ + gulp.watch(flatten([ paths.eslintrc ]), [ 'lint' @@ -50,7 +50,7 @@ gulp.task('validate', function (done) { gulp.task('lint', function () { - return gulp.src(_.flatten([ + return gulp.src(flatten([ paths.libJsFiles, paths.gulpfile, paths.specFiles, diff --git a/lib/plumbing.js b/lib/plumbing.js index 979a0f2..f7b8cb5 100644 --- a/lib/plumbing.js +++ b/lib/plumbing.js @@ -1,10 +1,10 @@ 'use strict'; var errors = require('./errors.js'), - isFunction = require('lodash/isFunction'), - isObjectLike = require('lodash/isObjectLike'), - isString = require('lodash/isString'), - isUndefined = require('lodash/isUndefined'); + isFunction = require('lodash.isfunction'), + isObjectLike = require('lodash.isobjectlike'), + isString = require('lodash.isstring'), + isUndefined = require('lodash.isundefined'); module.exports = function (options) { diff --git a/package.json b/package.json index fc419a0..706ff1f 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,10 @@ "node": ">=0.10.0" }, "dependencies": { - "lodash": "^4.17.15" + "lodash.isfunction": "^3.0.9", + "lodash.isobjectlike": "^4.0.0", + "lodash.isstring": "^4.0.1", + "lodash.isundefined": "^3.0.1" }, "peerDependencies": { "request": "^2.34" @@ -50,6 +53,7 @@ "gulp-eslint": "~2.1.0", "gulp-istanbul": "~1.0.0", "gulp-mocha": "~2.2.0", + "lodash.flatten": "^4.4.0", "node-version": "~1.0.0", "publish-please": "~2.4.1", "request": "^2.34.0", diff --git a/test/spec/plumbing.js b/test/spec/plumbing.js index d6f9e7e..24c5f0a 100644 --- a/test/spec/plumbing.js +++ b/test/spec/plumbing.js @@ -1,6 +1,6 @@ 'use strict'; -var _ = require('lodash'), +var isFunction = require('lodash.isfunction'), Bluebird = require('bluebird'), errors = require('../../errors'), plumbing = require('../../'); @@ -62,8 +62,8 @@ describe('Promise-Core\'s Plumbing', function () { pl.init.call(context, {}); - expect(_.isFunction(context._rp_promise.then)).to.eql(true); - expect(_.isFunction(context._rp_resolve)).to.eql(true); + expect(isFunction(context._rp_promise.then)).to.eql(true); + expect(isFunction(context._rp_resolve)).to.eql(true); context._rp_resolve(); @@ -82,8 +82,8 @@ describe('Promise-Core\'s Plumbing', function () { var context = {}; pl.init.call(context, {}); - expect(_.isFunction(context._rp_promise.then)).to.eql(true); - expect(_.isFunction(context._rp_reject)).to.eql(true); + expect(isFunction(context._rp_promise.then)).to.eql(true); + expect(isFunction(context._rp_reject)).to.eql(true); context._rp_reject(new Error('Rejected by test case')); @@ -134,7 +134,7 @@ describe('Promise-Core\'s Plumbing', function () { var context = {}; pl.init.call(context, {}); - expect(_.isFunction(context._rp_options.callback)).to.eql(true); + expect(isFunction(context._rp_options.callback)).to.eql(true); delete context._rp_options.callback; expect(context._rp_options).to.eql({