Compare commits

...

2 Commits

Author SHA1 Message Date
Sven Slootweg b3a9d1a25e 0.0.4 8 years ago
Sven Slootweg f7ba152952 Add missing default for `options` 8 years ago

@ -1,6 +1,6 @@
{
"name": "get-project-root",
"version": "0.0.3",
"version": "0.0.4",
"description": "Locates the 'root directory' of the current project",
"main": "index.js",
"scripts": {

@ -29,7 +29,7 @@ function reachedRoot(candidatePath) {
return /^(?:\/|[a-z]:\\)$/i.test(candidatePath);
}
module.exports = function(options) {
module.exports = function(options = {}) {
let currentPath = defaultValue(options.basePath, __dirname);
let checker = defaultValue(options.checker, "package.json");

Loading…
Cancel
Save