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

shimmer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shimmer - npm Package Compare versions

Comparing version 0.7.1 to 0.7.3

1

index.js

@@ -39,2 +39,3 @@ 'use strict';

wrapped.__original = original;
wrapped.__unwrap = function () {

@@ -41,0 +42,0 @@ if (nodule[name] === wrapped) nodule[name] = original;

2

package.json
{
"name": "shimmer",
"version": "0.7.1",
"version": "0.7.3",
"description": "Safe(r) monkeypatching for JavaScript.",

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

@@ -17,6 +17,6 @@ 'use strict';

test("should wrap safely", function (t) {
t.plan(6);
t.plan(8);
t.equal(counter, generator.inc, "basic function equality testing should work");
t.doesNotThrow(function () { generator.inc(); });
t.equal(counter, generator.inc, "method is mapped to function");
t.doesNotThrow(function () { generator.inc(); }, "original funciton works");
t.equal(1, outsider, "calls have side effects");

@@ -35,3 +35,5 @@

t.doesNotThrow(function () { generator.inc(); });
t.ok(generator.inc.__wrapped, "function tells us it's wrapped");
t.equal(generator.inc.__original, counter, "original function is available");
t.doesNotThrow(function () { generator.inc(); }, "wrapping works");
t.equal(2, count, "both pre and post increments should have happened");

@@ -38,0 +40,0 @@ t.equal(2, outsider, "original function has still been called");

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