namefn

1.0.0 • Public • Published

namefn

Create an equivalent function with a new name.

var nameFn = require('namefn')

function User() {

}

console.log(new User()) // User {}

var OtherUser = nameFn('OtherUser', User)

console.log(new OtherUser()) // OtherUser {}

The original function's properties, arity and prototype are maintained with the newly named function.

See Also

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    5

Package Sidebar

Install

npm i namefn

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • timoxley