app-etc-config
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -13,3 +13,3 @@ 'use strict'; | ||
* FUNCTION: clone( [ keypath[, options] ] ) | ||
* If no `keypath` is provided, clones the entire configuration. If a `keypath` is provided, clones the sub-configuration corresponding to the provided key path. If a `keypath` does not exist, returns `null`. | ||
* If no `keypath` is provided, clones the entire configuration. If a `keypath` is provided, clones the sub-configuration corresponding to the provided key path. If a `keypath` does not exist, returns `undefined`. | ||
* | ||
@@ -19,3 +19,3 @@ * @param {String} [keypath] - key path | ||
* @param {String} [options.sep] - keypath separator | ||
* @returns {Config|Null} new instance or null | ||
* @returns {Config|Void} new instance or undefined | ||
*/ | ||
@@ -42,3 +42,3 @@ function clone( keypath, options ) { | ||
if ( tmp === void 0 ) { | ||
return null; | ||
return tmp; | ||
} | ||
@@ -45,0 +45,0 @@ if ( isObject( tmp ) ) { |
{ | ||
"name": "app-etc-config", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Creates a configuration API.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -158,3 +158,3 @@ Config | ||
If a `keypath` does __not exist__, the method returns `undefined`. | ||
If a `keypath` does __not__ exist, the method returns `undefined`. | ||
@@ -194,3 +194,3 @@ ``` javascript | ||
If provided a `keypath`, clones a sub-configuration value as a new `config` instance. | ||
If provided a `keypath`, the method clones a sub-configuration value as a new `config` instance. | ||
@@ -218,2 +218,9 @@ ``` javascript | ||
If a `keypath` does __not__ exist, the method returns `undefined`. | ||
``` javascript | ||
var config3 = config.clone( 'non.existent.path' ); | ||
// returns undefined | ||
``` | ||
The method accepts the following `options`: | ||
@@ -220,0 +227,0 @@ |
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
21406
399