New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

monkeyify

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monkeyify - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

monkeyify.js

@@ -32,3 +32,3 @@ /* ZenWANG@zenw.org 12/Mar/2020 */

if (!_isFunction(originalFunction)) throw new Error('Cannot monkeyify a non-function variable! ⊂((≧⊥≦))⊃~');
if ('function' === typeof patchOpt) patchOpt = { monkey: patchOpt };
if (_isFunction(patchOpt)) patchOpt = { monkey: patchOpt };
var hasCaller = Object.prototype.hasOwnProperty.call(patchOpt, 'caller');

@@ -35,0 +35,0 @@ var _patchFunc = patchOpt.monkey;

{
"name": "monkeyify",
"version": "0.0.2",
"version": "0.0.3",
"description": "Monkey patch factory",

@@ -14,2 +14,3 @@ "main": "monkeyify.js",

"keywords": [
"monkey-patch",
"monkey",

@@ -16,0 +17,0 @@ "patch",

@@ -8,4 +8,11 @@ # monkeyify

window.atob = monkeyify(window.atob, {
caller: {name: 'I am the caller, I will be given in the first argument in monkey function'},
allowMonkeyInMonkey: 'return old monkey'; // true or 'return old monkey'
// bind a caller, the default is the caller when the monkeyify function is called
caller: window,
// true(To monkeyify a monkeyifyed function is allowed)
// 'return old monkey'(Return the first monkeyifyed function when you want to monkeyify a monkeyifyed function)
allowMonkeyInMonkey: 'return old monkey';
// monkey patch function. caller, args array and the original function
monkey: function (caller, args, original) {

@@ -12,0 +19,0 @@ var base64url = args[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