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

unbounded

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unbounded - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

28

es2015/index.js

@@ -5,5 +5,15 @@ 'use strict';

function define(bounded, unbounded) {
if (bounded.unbounded !== unbounded) {
Object.defineProperty(bounded, 'unbounded', {
value: unbounded.unbounded || unbounded,
enumerable: false,
configurable: false,
writable: false
});
}
return bounded;
}
function binder() {
var unbounded = this.unbounded || this;
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {

@@ -13,10 +23,5 @@ args[_key] = arguments[_key];

var result = bind.apply(this, args);
Object.defineProperty(result, 'unbounded', {
value: unbounded,
enumerable: false,
configurable: false,
writable: false
});
return result;
var bounded = bind.apply(this, args);
define(bounded, this);
return bounded;
}

@@ -29,4 +34,5 @@

}
return module.exports;
}
module.exports = { bind: bind, binder: binder, patch: patch };
module.exports = { bind: bind, binder: binder, patch: patch, define: define };
# History
## v1.1.0 2018 July 13
- Exports `define` for manually specifying the `unbounded` property
## v1.0.0 2018 July 13
- Initial working version
{
"name": "unbounded",
"version": "1.0.0",
"version": "1.1.0",
"description": "Function.prototype.bind replacement that provides an `unbounded` hidden property on the returned bounded function, that contains the original unbounded function",

@@ -5,0 +5,0 @@ "homepage": "ssh://git@github.com/bevry/unbounded",

@@ -46,3 +46,3 @@ <!-- TITLE/ -->

<li>Module: <code>require('unbounded')</code></li>
<li>CDN URL: <code>//wzrd.in/bundle/unbounded@1.0.0</code></li></ul>
<li>CDN URL: <code>//wzrd.in/bundle/unbounded@1.1.0</code></li></ul>

@@ -49,0 +49,0 @@ <a href="http://enderjs.com" title="Ender is a full featured package manager for your browser"><h3>Ender</h3></a><ul>

@@ -5,12 +5,18 @@ 'use strict'

function define (bounded, unbounded) {
if (bounded.unbounded !== unbounded) {
Object.defineProperty(bounded, 'unbounded', {
value: unbounded.unbounded || unbounded,
enumerable: false,
configurable: false,
writable: false
})
}
return bounded
}
function binder (...args) {
const unbounded = this.unbounded || this
const result = bind.apply(this, args)
Object.defineProperty(result, 'unbounded', {
value: unbounded,
enumerable: false,
configurable: false,
writable: false
})
return result
const bounded = bind.apply(this, args)
define(bounded, this)
return bounded
}

@@ -23,4 +29,5 @@

}
return module.exports
}
module.exports = { bind, binder, patch }
module.exports = { bind, binder, patch, define }
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