Comparing version 0.1.2 to 0.1.3
@@ -46,3 +46,4 @@ | ||
var types = new Types(); | ||
var types = new Types() | ||
, proto = Object.getPrototypeOf(types); | ||
@@ -64,5 +65,15 @@ var type = function( item ){ | ||
type.__proto__ = types; | ||
Object.keys(proto).forEach(function(key){ | ||
if (!type[key]) type[key] = types[key].bind(types); | ||
else throw new Error('Failed to map property «'+key+'» of types to type :('); | ||
}); | ||
Object.keys(types).forEach(function(key){ | ||
if (!type[key]) type[key] = types[key]; | ||
else throw new Error('Failed to map property «'+key+'» of types to type :('); | ||
}); | ||
module.exports = type; |
{ | ||
"name": "ee-types" | ||
, "description": "Reliabale type detection" | ||
, "version": "0.1.2" | ||
, "version": "0.1.3" | ||
, "homepage": "https://github.com/eventEmitter/ee-types" | ||
@@ -6,0 +6,0 @@ , "author": "Michael van der Weg <michael@eventemitter.com> (http://eventemitter.com/)" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6514
85