configfiles
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -7,7 +7,19 @@ module.exports = function (input) { | ||
if (files) { | ||
// if we have a src key or the files object is an array, | ||
// we're done. | ||
if(Array.isArray(files) || files.src) { | ||
// if we have a src key, this is a singular files object and | ||
// we can just return it. | ||
if (files.src) { | ||
return files; | ||
} | ||
if (Array.isArray(files)) { | ||
// this is a bad heuristic. check the first source to see if it | ||
// is a string. if it is, assume files is just an array of sources | ||
if(typeof files[0] === 'string') { | ||
return input; | ||
} else { | ||
// otherwise files is fully expanded already, and we can just return it | ||
return files; | ||
} | ||
} | ||
// if we have a files object, but no source key, assume this form | ||
@@ -14,0 +26,0 @@ // files: { |
{ | ||
"name": "configfiles", | ||
"description": "Get files from a configuration using globule.", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"homepage": "https://github.com/tkellen/node-configfiles", | ||
@@ -44,3 +44,6 @@ "author": { | ||
"awesome" | ||
] | ||
], | ||
"devDependencies": { | ||
"tap": "~0.4.8" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6745
92
1