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.3.1 to 0.3.2

5

lib/Thing.js
"use strict";
var util = require("util"),

@@ -244,3 +243,3 @@ path = require("path"),

initInstanceVars(this);
if (!propertyName) error(this, new Error("please supply an propertyName"));
if (!propertyName) error(this, new Error("please supply a propertyName"));

@@ -421,3 +420,3 @@ var item = this._definitions[propertyName];

/**
A annoy of defined properties
An array of defined properties
@property properties

@@ -424,0 +423,0 @@ @type Array

8

package.json
{
"name": "nature",
"version": "0.3.1",
"version": "0.3.2",
"description": "Classify the things in your world and how they interact.",

@@ -14,7 +14,7 @@ "main": "lib/nature.js",

"dependencies": {
"underscore": "~1.5.2",
"wodge": "~0.1.0"
"underscore": "~1.6",
"wodge": "~0.3.0"
},
"devDependencies": {
"mocha": "~1.17",
"mocha": "~1.18",
"grunt": "~0.4.1",

@@ -21,0 +21,0 @@ "yuidoc2md": "~0.2.2",

@@ -8,6 +8,3 @@ var assert = require("assert"),

describe("Thing", function(){
it("should toArray()");
it("should list defined properties");
it("should be compatible with --property=value style");
it("passing required:true should test for defaultOption.length > 0");
it("should remove() an property and its alias");
it("this case should be invalid straight after definition: { type: Array, valueTest: function(a){ return a.length > 0; }}");

@@ -26,2 +23,3 @@ it("should throw when a none-existent property is accessed, e.g. console.log(properties.dfkdshl)");

it("should emit 'invalid' when thing changes from valid to invalid");
it("nature should set valid=false on error, instead of throwing an error requiring a handler")

@@ -188,4 +186,2 @@ var _thing;

it("should remove() an property and its alias");
describe(".get", function(){

@@ -404,13 +400,14 @@ it("get(property) with no value set", function(){

it(".clone()", function(){
_thing.define({ name: "one", type: "number", value: 1 })
.define({ name: "two", type: "number", value: 2 });
describe(".clone", function(){
it("clones correctly", function(){
_thing.define({ name: "one", type: "number", value: 1 })
.define({ name: "two", type: "number", value: 2 });
var config2 = _thing.clone();
assert.notStrictEqual(_thing, config2);
assert.deepEqual(_.omit(_thing.definition("one"), "config"), _.omit(config2.definition("one"), "config"));
assert.deepEqual(_.omit(_thing.definition("two"), "config"), _.omit(config2.definition("two"), "config"));
var config2 = _thing.clone();
assert.notStrictEqual(_thing, config2);
assert.deepEqual(_.omit(_thing.definition("one"), "config"), _.omit(config2.definition("one"), "config"));
assert.deepEqual(_.omit(_thing.definition("two"), "config"), _.omit(config2.definition("two"), "config"));
});
});
it(".properties() should return Array of property names");
describe(".mixin", function(){

@@ -417,0 +414,0 @@ it("mixin(thing)", function(){

Sorry, the diff of this file is not supported yet

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