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

alien-bind

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

alien-bind - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "alien-bind",
"version": "1.0.0",
"version": "1.0.1",
"description": "An implementation of bind that does not use Function.prototype.bind.",

@@ -5,0 +5,0 @@ "main": "alien-bind.js",

@@ -8,3 +8,3 @@ /* global describe, it, expect, beforeEach, afterEach */

beforeEach(function () {
sinon.spy(Function.prototype, 'bind')
createOrStub(Function.prototype, 'bind')
bind = require('./alien-bind')

@@ -30,3 +30,3 @@ })

expect(internals.this).to.be(context)
expect(internals.context).to.be(context)
expect(internals.args.length).to.be(0)

@@ -41,3 +41,3 @@ })

expect(internals.this).to.be(context)
expect(internals.context).to.be(context)
expect(internals.args.length).to.be(1)

@@ -54,3 +54,3 @@ expect(internals.args[0]).to.be(arg0)

expect(internals.this).to.be(context)
expect(internals.context).to.be(context)
expect(internals.args.length).to.be(2)

@@ -69,3 +69,3 @@ expect(internals.args[0]).to.be(arg0)

expect(internals.this).to.be(context)
expect(internals.context).to.be(context)
expect(internals.args.length).to.be(3)

@@ -78,5 +78,16 @@ expect(internals.args[0]).to.be(arg0)

function createOrStub (parent, methodName) {
if (parent[methodName] !== undefined) {
return sinon.stub(parent, methodName)
}
parent[methodName] = sinon.stub()
parent[methodName].restore = function () {
delete parent[methodName]
}
return parent[methodName]
}
function introspection () {
return {
this: this,
context: this,
args: arguments

@@ -83,0 +94,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