Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

obj-case

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

obj-case - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

History.md
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 @@ ==================

2

index.js

@@ -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 () {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc