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

mpwrapper

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mpwrapper - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

build/src/wrapper.d.ts
import { AnyFunction, WrapperObj } from './types';
export declare function wrap(obj: any, name: string, userWrapper: AnyFunction): WrapperObj;
export declare function massWrap(objs: any | any[], names: string[], userWrapper: AnyFunction, getUnwrap?: boolean): WrapperObj[];
export declare function massWrap(objs: any | any[], names: string[], userWrapper: AnyFunction): WrapperObj[];
export declare function unwrap(obj: any, name: string): void;
export declare function massUnwrap(objs: any | any[], names: string[]): void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const WRAPPED = '__mpWrapped';
const WRAPPED_SHIMMER = '__wrapped';
const storeWrapper = new WeakMap();

@@ -30,3 +29,3 @@ const logger = console.error.bind(console);

exports.wrap = wrap;
function massWrap(objs, names, userWrapper, getUnwrap) {
function massWrap(objs, names, userWrapper) {
const results = [];

@@ -155,6 +154,4 @@ if (!objs) {

}
// compatible with shimmer for any checks etc.
// just for testing purposes, later to be removed
defineProperty(wrapper, WRAPPED, true);
defineProperty(wrapper, WRAPPED_SHIMMER, true);
extendObject(original, next);
defineProperty(obj, name, wrapper);

@@ -190,2 +187,7 @@ storeWrapper.set(wrapper, {

}
function extendObject(source, destination) {
Object.keys(source).forEach((key) => {
destination[key] = source[key];
});
}
//# sourceMappingURL=wrapper.js.map
{
"name": "mpwrapper",
"version": "0.1.3",
"version": "0.1.4",
"description": "Monkey Patch Wrapper that support multiple wrapping and unwrapping",

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

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