newt

force insanceof... I got better!

newt

let a constructor be used with or without new

... because typing boilerplate patterns sucks

var newt = require('newt')
 
var person = newt(function person(firstName) {
  this.firstName = firstName
})
 
person.prototype.intro = function(other) {
  console.log('Hey ' + other.firstName + ', I\'' + this.firstName)
}
 
var me = person('jden')
var other = person('interweb')
 
me.intro(other)
// => "Hey interweb, I'm jden" 
 
$ npm install newt

From package root:

$ npm install
$ npm test

MIT. (c) MMXIII jden jason@denizac.org. See LICENSE.md

"She turned me into a newt.... I got better!"