Skip to content

Commit

Permalink
use try-require-please
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnckoCore committed Feb 17, 2016
1 parent 13be7a1 commit 265378d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion index.js
Expand Up @@ -9,6 +9,7 @@

var extend = require('extend-shallow')
var parseLink = require('parse-link-header')
var tryRequire = require('try-require-please')

/**
* > Perform multiple requests until the last
Expand Down Expand Up @@ -40,7 +41,7 @@ module.exports = function requestAll (url, opts, cb) {
return url
}

factory(require('simple-get'))(url, opts, cb)
factory(tryRequire('simple-get', 'request-all'))(url, opts, cb)
}

function factory (simpleGet) {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -12,7 +12,8 @@
},
"dependencies": {
"extend-shallow": "^2.0.1",
"parse-link-header": "^0.4.1"
"parse-link-header": "^0.4.1",
"try-require-please": "^1.0.0"
},
"devDependencies": {
"assertit": "^0.1.0",
Expand Down Expand Up @@ -60,4 +61,4 @@
"simple-get"
]
}
}
}

0 comments on commit 265378d

Please sign in to comment.