newt
v0.1.0
Published
force insanceof... I got better!
Downloads
4
Readme
newt
let a constructor be used with or without new
... because typing boilerplate patterns sucks
usage
var newt = require('newt')
var person = newt(function person(firstName) {
this.firstName = firstName
})
person.prototype.intro = function(other) {
console.log('Hey ' + other.firstName + ', I\'m ' + this.firstName)
}
var me = person('jden')
var other = person('interweb')
me.intro(other)
// => "Hey interweb, I'm jden"
installation
$ npm install newt
running the tests
From package root:
$ npm install
$ npm test
contributors
- jden [email protected]
license
MIT. (c) MMXIII jden [email protected]. See LICENSE.md
"She turned me into a newt.... I got better!"