Socket
Socket
Sign inDemoInstall

mimic-fn

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 2.0.0

index.d.ts

9

index.js
'use strict';
module.exports = (to, from) => {
// TODO: use `Reflect.ownKeys()` when targeting Node.js 6
for (const prop of Object.getOwnPropertyNames(from).concat(Object.getOwnPropertySymbols(from))) {
const mimicFn = (to, from) => {
for (const prop of Reflect.ownKeys(from)) {
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));

@@ -10,1 +10,4 @@ }

};
module.exports = mimicFn;
module.exports.default = mimicFn;
{
"name": "mimic-fn",
"version": "1.2.0",
"version": "2.0.0",
"description": "Make a function mimic another one",

@@ -13,9 +13,10 @@ "license": "MIT",

"engines": {
"node": ">=4"
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
"test": "xo && ava && tsd-check"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],

@@ -38,5 +39,6 @@ "keywords": [

"devDependencies": {
"ava": "*",
"xo": "*"
"ava": "^1.3.1",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
}
}

@@ -46,3 +46,3 @@ # mimic-fn [![Build Status](https://travis-ci.org/sindresorhus/mimic-fn.svg?branch=master)](https://travis-ci.org/sindresorhus/mimic-fn)

It will modify `to` and return it.
Modifies the `to` function and returns it.

@@ -49,0 +49,0 @@ #### to

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc