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

minimal-js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimal-js - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

bower.json
{
"name": "minimal-js",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/cztomsik/minimal-js",

@@ -5,0 +5,0 @@ "authors": [

@@ -37,4 +37,4 @@ 'use strict';

var res = extend(this, data, {constructor: Clz});
return (res.init && res.init.apply(res, arguments)) || res;
return (proto.init && proto.init.apply(res, arguments)) || res;
}
}
{
"name": "minimal-js",
"version": "0.2.0",
"version": "0.2.1",
"description": "minimal js extensions",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -68,3 +68,3 @@ # minimal-js

it is possible to define static methods with extend, .
it is possible to define static methods with extend.

@@ -98,2 +98,3 @@ ```js

;
assert(heroes[0].name === 'Batman');

@@ -109,2 +110,15 @@ assert(heroes[0].hello() === 'Hello, Batman');

data.init wont be called (inheritance).
```js
var
BaseModel = defClass('BaseModel', {}),
User = defClass('User', new BaseModel({
init: function(){
assert.fail();
}
}))
;
```
<a name="dotprop-args"></a>

@@ -152,3 +166,3 @@ # dot(prop, args...)

;
assert.deepEqual(initials, ['B', 'J']);

@@ -169,3 +183,3 @@ ```

var dest = {prop: 'test'};
extend(dest, {newProp: 'test'});

@@ -179,3 +193,3 @@ assert(dest.newProp === 'test');

var dest = {prop: 'test'};
extend(dest, {prop: 'new'});

@@ -189,3 +203,3 @@ assert(dest.prop === 'new');

var a = {}, b = {};
assert(extend(a) === a);

@@ -199,3 +213,3 @@ assert(extend(a, b) === a);

var src = {prop: 'test'};
assert.deepEqual(extend({}, src), src);

@@ -208,3 +222,3 @@ ```

var a = {a: 1}, b = {b: 2}, c = {c: 3};
assert.deepEqual(extend(a, b, c), extend(extend(a, b), c));

@@ -228,1 +242,2 @@ ```

```

@@ -64,3 +64,3 @@ 'use strict';

it('it is possible to define static methods with extend, ', function(){
it('it is possible to define static methods with extend', function(){
var

@@ -98,2 +98,13 @@ ActiveRecord = extend(defClass('ActiveRecord', {}), {

});
it('data.init wont be called (inheritance)', function(){
var
BaseModel = defClass('BaseModel', {}),
User = defClass('User', new BaseModel({
init: function(){
assert.fail();
}
}))
;
});
});
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