Skip to content

Commit

Permalink
Remove boolean trap
Browse files Browse the repository at this point in the history
  • Loading branch information
nkbt committed Sep 1, 2015
1 parent e2d6827 commit a2bd751
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/find-scaffolds.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const loaded = npm => (resolve, reject) => (error) => {


// TODO: add caching
const findScaffolds = npm => global => () =>
const findScaffolds = npm => options => () =>
// Configure npm to search for dependencies globally or locally with minimal depth
new Promise((...args) => npm.load({global, silent: true, depth: 0}, loaded(npm)(...args)));
new Promise((...args) => npm.load({silent: true, depth: 0, ...options}, loaded(npm)(...args)));


export const findLocal = npm => findScaffolds(npm)(false);
export const findLocal = npm => findScaffolds(npm)({global: false});


export const findGlobal = npm => findScaffolds(npm)(true);
export const findGlobal = npm => findScaffolds(npm)({global: true});

0 comments on commit a2bd751

Please sign in to comment.