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

esq

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esq - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

3

esq.js

@@ -42,3 +42,4 @@ (function() {

}
base = base[lastName] = ((typeof base[lastName] === "object") ? base[lastName] : undefined) || value || Object.create(null);
base = base[lastName] = ((typeof base[lastName] === "object") ? base[lastName] : undefined) ||
((value === null || typeof value === "undefined") ? Object.create(null) : value);
}

@@ -45,0 +46,0 @@

{
"name": "esq",
"version": "0.0.12",
"version": "0.0.13",
"description": "Easily build elasticsearch queries",

@@ -5,0 +5,0 @@ "author": "Rahul Patel <rahul.patel@holidayextras.com>",

@@ -48,2 +48,13 @@ var assert = require('assert');

});
it('with zero value', function() {
var result = esq.query('foo', 0);
assert.deepEqual(result, { foo: 0 });
});
it('with false value', function() {
var result = esq.query('foo', false);
assert.deepEqual(result, { foo: false });
});
});

@@ -70,2 +81,12 @@

it('with zero value parameter', function() {
esq._createNestedObject(base, ['a', 'b'], 0);
assert.deepEqual(base, { a: { b: 0 } });
});
it('with false value parameter', function() {
esq._createNestedObject(base, ['a', 'b'], false);
assert.deepEqual(base, { a: { b: false } });
});
it('with object type value parameters', function() {

@@ -72,0 +93,0 @@ esq._createNestedObject(base, ['a'], { b: 'c' });

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