New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

newt

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

newt

force insanceof... I got better!

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

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 jason@denizac.org

license

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

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

Keywords

new

FAQs

Package last updated on 20 Sep 2013

Related posts