Comparing version 0.0.4 to 0.0.5
@@ -47,4 +47,22 @@ #!/usr/bin/env node | ||
// Are descendant path(s) contained within ancestor path? Note: does not test | ||
// if paths actually exist. | ||
sync.doesPathContain = function(ancestor) { | ||
ancestor = node_path.resolve(ancestor); | ||
var relative; | ||
var i = 1; | ||
for (; i < arguments.length; i ++) { | ||
relative = node_path.relative(node_path.resolve(arguments[i]), ancestor); | ||
if (relative === '' || /\w+/.test(relative)) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
}; | ||
// @param {Object} options { | ||
@@ -51,0 +69,0 @@ // force: {boolean} force to overridding |
{ | ||
"name": "fs-sync", | ||
"version": "0.0.4", | ||
"description": "synchronous fs with more fun", | ||
"main": "dist/index", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "kael", | ||
"license": "BSD", | ||
"keywords": [ | ||
"fs", | ||
"fs-sync", | ||
"sync", | ||
"synchronous fs", | ||
"copy", | ||
"mkdir", | ||
"mkdirp", | ||
"write", | ||
"read", | ||
"readJSON", | ||
"isDir", | ||
"isFile", | ||
"isLink", | ||
"exists", | ||
"grunt file", | ||
"delete", | ||
"expand" | ||
], | ||
"repository": "", | ||
"dependencies": { | ||
"mkdirp": "~0.3.5", | ||
"iconv-lite": "~0.2.10", | ||
"lodash": "~1.2.1", | ||
"glob": "~3.2.1", | ||
"rimraf": "~2.1.4" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.1" | ||
} | ||
} | ||
"name": "fs-sync", | ||
"version": "0.0.5", | ||
"description": "synchronous fs with more fun", | ||
"main": "dist/index", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "kael", | ||
"license": "BSD", | ||
"keywords": [ | ||
"fs", | ||
"fs-sync", | ||
"sync", | ||
"synchronous fs", | ||
"copy", | ||
"mkdir", | ||
"mkdirp", | ||
"write", | ||
"read", | ||
"readJSON", | ||
"isDir", | ||
"isFile", | ||
"isLink", | ||
"exists", | ||
"grunt file", | ||
"delete", | ||
"expand", | ||
"contain" | ||
], | ||
"repository": "", | ||
"dependencies": { | ||
"mkdirp": "~0.3.5", | ||
"iconv-lite": "~0.2.10", | ||
"lodash": "~1.2.1", | ||
"glob": "~3.2.1", | ||
"rimraf": "~2.1.4" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.1" | ||
}, | ||
"cortexExactDependencies": {} | ||
} |
16926
19
361