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.5.3 to 0.5.4

test/model-events.js

7

lib/Attribute.js
"use strict";
var w = require("wodge");
var a = require("array-ting"),
t = require("typical");

@@ -47,3 +48,3 @@ module.exports = Attribute;

w.arrayify(_valueTest).forEach(function(valueTest){
a.arrayify(_valueTest).forEach(function(valueTest){
if(valueTest instanceof RegExp){

@@ -111,3 +112,3 @@ /*

// typecast to Number
if (this.type === "number" && w.isNumber(newValue)){
if (this.type === "number" && t.isNumber(newValue)){
_value = Number(newValue);

@@ -114,0 +115,0 @@

var Model = require("./Model2"),
w = require("wodge");
a = require("array-ting");

@@ -37,3 +37,3 @@ module.exports = Design;

if (options) {
attribute.groups = w.arrayify(options.groups);
attribute.groups = a.arrayify(options.groups);
}

@@ -44,7 +44,7 @@ this._attributes.push(attribute);

Design.prototype.groups = function(){
var groups = w.pluck(this._attributes, "groups");
var groups = a.pluck(this._attributes, "groups");
var flattened = groups.reduce(function(prev, curr){
return prev.concat(curr);
}, []);
return w.unique(flattened);
return a.unique(flattened);
};

@@ -55,3 +55,3 @@ Design.prototype.where = function(expression, model){

var attributes = this._attributes.filter(iterator);
var names = w.pluck(attributes, "name");
var names = a.pluck(attributes, "name");
for (var i = 0; i < attributes.length; i++){

@@ -58,0 +58,0 @@ output[names[i]] = model[names[i]];

@@ -0,3 +1,10 @@

var EventEmitter = require("events").EventEmitter,
util = require("util");
module.exports = Model;
/**
@class
@classdesc
*/
function Model(attributes){

@@ -29,1 +36,2 @@ var self = this;

}
util.inherits(Model, EventEmitter);
{
"name": "nature",
"version": "0.5.3",
"version": "0.5.4",
"description": "Classify the things in your world and how they interact.",

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

"dependencies": {
"wodge": "~0.7"
"array-ting": "^1.0.0",
"typical": "^1.0.0"
},
"devDependencies": {
"tap": "^0.4.9"
"tape": "^2.13.2"
}
}

@@ -19,11 +19,2 @@ [![view on npm](http://img.shields.io/npm/v/nature.svg)](https://www.npmjs.org/package/nature)

Command line parse
------------------
- define which are boolean options
- which is the default option
- define alias
- define description
- free usage
Collection

@@ -30,0 +21,0 @@ ----------

@@ -1,2 +0,2 @@

var test = require("tap").test;
var test = require("tape");
var Design = require("../lib/Design");

@@ -3,0 +3,0 @@ var Model = require("../lib/Model2");

@@ -1,2 +0,2 @@

var test = require("tap").test;
var test = require("tape");
var Design = require("../lib/Design");

@@ -3,0 +3,0 @@ var Model = require("../lib/Model2");

@@ -1,2 +0,2 @@

var test = require("tap").test;
var test = require("tape");
var Design = require("../lib/Design");

@@ -3,0 +3,0 @@ var Model = require("../lib/Model2");

@@ -1,6 +0,6 @@

var test = require("tap").test;
var test = require("tape");
var Design = require("../lib/Design");
var Model = require("../lib/Model2");
test("design.where(model, { groups: 'blah' })", function(t){
test("design.groups()", function(t){
var attributes = [

@@ -28,3 +28,3 @@ {

test("design.where(model, { groups: 'blah' })", function(t){
test("design.groups() with attributes with multiple groups", function(t){
var attributes = [

@@ -31,0 +31,0 @@ {

@@ -1,2 +0,2 @@

var test = require("tap").test;
var test = require("tape");
var Design = require("../lib/Design");

@@ -3,0 +3,0 @@ var Model = require("../lib/Model2");

@@ -1,2 +0,2 @@

var test = require("tap").test;
var test = require("tape");
var Design = require("../lib/Design");

@@ -63,2 +63,1 @@

});
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