Rename a function
- ES2015 syntax
$ npm install @vect/clone
import { clone } from '@vect/clone'
const func = x => x
console.log(func.name) // func
clone(func, 'not-a-method')
console.log(func.name) // not-a-method
Rename a function
$ npm install @vect/clone
import { clone } from '@vect/clone'
const func = x => x
console.log(func.name) // func
clone(func, 'not-a-method')
console.log(func.name) // not-a-method
npm i @vect/clone
528
0.8.0
MIT
4.97 kB
4