Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-03-23 03:32:10 +0300
committerisaacs <i@izs.me>2011-03-23 03:32:10 +0300
commit8537bce078db642a62c73bd595444167730029b3 (patch)
tree596595c8713d5bec69b503bf7160e932cc8eb092 /lib
parent7a8dbda024be76cea9b21264cae4681e5306156f (diff)
Remove uncalled function
Diffstat (limited to 'lib')
-rw-r--r--lib/utils/load-package-defaults.js24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/utils/load-package-defaults.js b/lib/utils/load-package-defaults.js
index a173fe75b..dcf5b91ed 100644
--- a/lib/utils/load-package-defaults.js
+++ b/lib/utils/load-package-defaults.js
@@ -27,30 +27,6 @@ function loadPackageDefaults (pkg, pkgDir, cb) {
, function (er) { cb(er, pkg) } )
}
-function addFile (list, f) {
- if (arguments.length === 1) return function (f) {
- addFile(list, f)
- }
- f = f.replace(/^\.\/|^\.$/, "")
- for (var i = 0, l = list.length; i < l; i ++) {
- var e = list[i]
- e = e.replace(/^\.\/|^\.$/, "")
- // obviously.
- if (e === f) return
- // "" means "include everything"
- if (!e) return
- // "foo/" is implied by "foo"
- if (e + "/" === f) return
- // "foo/bar" implies "foo" and "foo/"
- if (e.indexOf(f) === 0
- && (e.charAt(f.length + 1) === "/" || f.slice(-1) === "/")) {
- return
- }
- }
- // not found, so add it.
- list.push(f)
-}
-
function objectForEach (obj, fn) {
Object.keys(obj).forEach(function (k) {
fn(obj[k])