Socket
Socket
Sign inDemoInstall

dry-underscore

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dry-underscore - npm Package Compare versions

Comparing version 0.21.8 to 0.21.9

lib/gis.js

1

index/common.index.js

@@ -16,2 +16,3 @@

_.format = require('../lib/format.js').library(_);
_.gis = require('../lib/gis.js').library(_);
_.test = require('../lib/test.js').library(_);

@@ -18,0 +19,0 @@ _.string_builder = require('../lib/string_builder.js').library(_);

9

lib/common.js

@@ -754,6 +754,9 @@ "use strict";

_.define = _.def = function(obj, key, defaultValue){
if(key === undefined){ return(obj); }
_.define = _.def = function(obj, key, default_value){
if(default_value === undefined){
if(obj === undefined){ return(key); }
if(obj !== undefined){ return(obj); }
}
if(obj[key] === undefined){
obj[key] = defaultValue;
obj[key] = default_value;
return(obj[key]);

@@ -760,0 +763,0 @@ }else{

@@ -639,5 +639,21 @@ "use strict";

test('define', function(){
var z = {'a': 'b'};
_.define(z, 'c', {}).c = 'c';
eq(z, {'a' : 'b', 'c' : {'c' : 'c'}});
var foo = {'a': 'b'};
_.define(foo, 'c', {}).d = 'd';
eq(foo, {'a' : 'b', 'c' : {'d' : 'd'}});
var bar = { a: 'b' }
eq(_.define(bar, 'c', 'c'), 'c');
eq(bar, { a: 'b', c: 'c' });
eq(_.define(), undefined);
eq(_.define(undefined, undefined), undefined);
eq(_.define(undefined, null), null);
eq(_.define(undefined, true), true);
eq(_.define({}.a, true), true);
eq(_.define("str", undefined), "str");
eq(_.define("str", null), "str");
eq(_.define("str", true), "str");
});

@@ -644,0 +660,0 @@

{
"name": "dry-underscore",
"version": "0.21.8",
"version": "0.21.9",
"dependencies": {

@@ -5,0 +5,0 @@ "deep-diff": {

{
"name": "dry-underscore",
"version": "0.21.8",
"version": "0.21.9",
"main": "./index/node.index.js",
"description": "The DRY Undescore Library",
"description": "The DRY Underscore Library",
"author": {

@@ -7,0 +7,0 @@ "name": "Kendrick Taylor",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc