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

nature

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nature - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

7

lib/Model.js

@@ -284,3 +284,2 @@ "use strict";

}
while (typeof (item = arrayItems.shift()) !== "undefined"){

@@ -310,3 +309,7 @@ var propertyPattern = /^-{1,2}/,

if (definition.type === Array || definition.type.name === "Array" || Array.isArray(definition.value) ){
target.set(propertyName, defaultValues);
if (Array.isArray(target[propertyName])){
target[propertyName] = target[propertyName].concat(defaultValues);
} else {
target.set(propertyName, defaultValues);
}
} else {

@@ -313,0 +316,0 @@ target.set(propertyName, defaultValues[0]);

{
"name": "nature",
"version": "0.4.2",
"version": "0.4.3",
"description": "Classify the things in your world and how they interact.",

@@ -5,0 +5,0 @@ "main": "lib/nature.js",

@@ -293,2 +293,21 @@ var assert = require("assert"),

it("set(array) should ammend defaultOption items", function(){
_thing.define({ name: "do", type: "string" });
_thing.define({ name: "when", type: Array, defaultOption: true });
_thing.define({ name: "change", type: "boolean" });
_thing.set([
'--do',
'tmp/balders.sh',
'--when',
'lib/Handbrake.js',
'lib/HandbrakeOptions.js',
'lib/handbrake-js.js',
'lib/progress.js',
'--change'
]);
/* --when is set initially with 'lib/Handbrake.js', the defaultOptions
where overwriting the initial value */
assert.strictEqual(_thing.when.length, 4);
});
it("should throw on empty property, i.e. 'rename -' or '--'");

@@ -295,0 +314,0 @@ });

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