Comparing version 0.1.0 to 0.1.1
0.1.1 / 2014-09-09 | ||
================== | ||
* Allow the terminal value to be null or undefined | ||
0.1.0 / 2014-09-02 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -57,3 +57,2 @@ | ||
finished = true; | ||
obj = null; | ||
return; | ||
@@ -84,2 +83,3 @@ } | ||
if (!key) return; | ||
if (null == obj) return obj; | ||
@@ -86,0 +86,0 @@ // the `obj` and `key` is one above the leaf object and key, so |
{ | ||
"name": "obj-case", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Work with objects of different cased keys", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -76,2 +76,12 @@ | ||
it('should work with a terminal value of null', function(){ | ||
var obj = { traits: { email: null } }; | ||
expect(objCase(obj, 'traits.email')).to.eql(null) | ||
}); | ||
it('should work with a terminal value of undefined', function(){ | ||
var obj = { traits: { email: undefined } }; | ||
expect(objCase(obj, 'traits.email')).to.eql(undefined) | ||
}); | ||
describe('casing', function(){ | ||
@@ -78,0 +88,0 @@ it('should find crazy looking paths', function () { |
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
12431
249