{"_id":"type-of-is","_rev":"77-9b893bc662bcfefd98722e5c5134183c","name":"type-of-is","description":"Determine and test types using constructor or {}.toString","dist-tags":{"latest":"3.5.1"},"versions":{"0.0.2":{"name":"type-of-is","version":"0.0.2","description":"Determine and test types using constructor.name {}.toString","main":"index.js","author":{"name":"Stephen Handley","email":"stephen@hello10.com","url":"http://hello10.com/"},"license":"BSD","scripts":{"test":"node test/all.js"},"repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"keywords":["type","checking","toString"],"_id":"type-of-is@0.0.2","dist":{"shasum":"7de770404c94fe5ae66a647ce8c0089156621c86","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-0.0.2.tgz","integrity":"sha512-tMlyIFIuCNWSIEQZgnH7pjgOumNMzyCAAtUJ6oK+D7iWwrry0tL4g5bMxfLkLO9uDN5SG8p98mb6tTiq3wuZ3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8rPl7friYSkV7v7Ugu0zzNC9wmA/Se6Jh/n8AOwNTNAIgC5VIWvmZht0KMgsu+4Dep9TH//ZZ305zMr+w3q25xes="}]},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}],"directories":{}},"1.0.0":{"name":"type-of-is","version":"1.0.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.4.0"},"devDependencies":{"asserts":"2.1.0"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@1.0.0","dist":{"shasum":"0f7c1d71ee534b6d6b6c607989e3a3ecb089bedc","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-1.0.0.tgz","integrity":"sha512-dvZOsznp+EcHBDjSNxjrbH4OzfDmvSMUqgJdqcdp/6J5Niwdo654SYDIseHbm9Y6EjX6+QVFzNcjM60MAql9Cw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBfwxgfEJY2zG4eC5x8IlYY+PcJtLLjCD3xt6THaEFwDAiAiYmQmUL4y7uU4/Ouh1u7rufakb8oujaKVn7XAxiwflw=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"1.1.0":{"name":"type-of-is","version":"1.1.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.4.0"},"devDependencies":{"asserts":"2.1.0"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@1.1.0","dist":{"shasum":"95b05fb666516efd9231e9acfe18c75d40131597","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-1.1.0.tgz","integrity":"sha512-vOunW9jNFWfMeJG4bfPg9cj34nqd7AykEmwqJuW4Sq8izO6KrabRVKY0d3bs4xB5Z25J2USretuj7Gxcd0VTlw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDfp+tj8OCi/AyStvbBmlZz3xLayhfsv31+c5sgIhvPOAiEAmksXw210Pbdm4YUZKqktRLUHVjFowvjyi5wMcUvwNC8="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"2.0.0":{"name":"type-of-is","version":"2.0.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.4.0"},"devDependencies":{"asserts":"2.1.0"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@2.0.0","dist":{"shasum":"40995ac2d74efa1289657f0f5f72f0ab7887c998","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-2.0.0.tgz","integrity":"sha512-P0hlWyYBGxCZrvP+NXpM4OPaTjppLePwSDxTPDvJSYoK156ViPFzWFRIUD3Ub2b0uaEmyAYTZ9jlcYxuFyZz3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvPKaPrR3aJT0rlJ/J5TPVKNcO3rgCCbqK2nUaOfy+5QIgdIfWQB/tc8JZDhoTtX9wbzghnU1fh6fiMEIOHZ8wSSg="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.0.0":{"name":"type-of-is","version":"3.0.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.4.0"},"devDependencies":{"asserts":"2.1.0"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@3.0.0","dist":{"shasum":"170cfc48271f6b9967707c77a0133fc387bfcfc0","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.0.0.tgz","integrity":"sha512-7CcrwdI9p958SGwSGz3X9aFGwo/C2pelA6kcH90fh6E+VZwWT3Da8qJKK1bVP4gIvZHunKHRRmjq4Bj+FGlliw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCdAlZPzjKmPf9pfGTw7o4qIEzU5+RCYZWjzz2wWcqQAIhAPL8LWUYpNrgW92GUPCd0njQwf/aBHi7WbssJMxZhgbY"}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.1.0":{"name":"type-of-is","version":"3.1.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.4.0"},"devDependencies":{"asserts":"2.1.0"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@3.1.0","dist":{"shasum":"238d118530de5c74369e6fd2196ecbe6a0f26e46","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.1.0.tgz","integrity":"sha512-pRrw+bNBckJlD6igQ5KB8bxXPgfpH92c+c8gM9IZLpzaoaxQfxUfQ4AtWK2Hy1mKlPZIcseESgJuSQq0XQtjIw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0+9Jr5Np5Jcu7ebZnXhciS/oTBhwXtbWJcUYSWlEpQwIgFgvKG/LENR+l7lcMFh9vG5pGEnIyD5jzDSoHeVkvMPI="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.1.2":{"name":"type-of-is","version":"3.1.2","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"asserts":"4.0.x"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@3.1.2","dist":{"shasum":"dc7a2b3133f3d5f59bbd1ef76b832a798442fac6","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.1.2.tgz","integrity":"sha512-GTlk2MGJfvDH361t29mTI+/GRucyxXochkJLfXsw64VsR6jbgqMIuHNHJD6dv3rPo3843eL/gtTiDbbwAG6v4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyBGU2k+u9Ylb9lxgbtzeRlvSFhobtAWjlHYE9q747jQIgNAG7d5iIk0+qCoyt0C6Rk3/t10G4i6ONGMz4X3Un3+E="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.1.3":{"name":"type-of-is","version":"3.1.3","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"asserts":"4.0.x"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@3.1.3","dist":{"shasum":"d039a3fa4ed91180e14553b0b74bed62f820962f","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.1.3.tgz","integrity":"sha512-HGyRLO0qJbGc1UgLTsriWMw4q+ZNEzD4fL5rpxMl6u8q9ooVRxj9tDvgt8IK1djBtczLimGurepRCfooK8u04Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsYZSp2NFcmLssOBAm21Phs4DYXELTrYUpyu9R76EPAAiAltJD2FxNHbiR37hljCxrUXUxPkMlT1/CQaSgAKeuleQ=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.2.0":{"name":"type-of-is","version":"3.2.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"asserts":"4.0.x"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"_id":"type-of-is@3.2.0","dist":{"shasum":"06717caa62197ffc3e62821a68448e064b5a8548","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.2.0.tgz","integrity":"sha512-LgF/vAOs+x9FznDw3FeloZu9oFAmIZWBojcgjbpsfqZILzXUc9tcUpTRbIHMlVTkapZY7u8b1w/ZALIWGXjuDQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/y/dQUJayIYPymupXIgxaWFlrt0raViJsP4unSivgDAiA/W1h1WCfEp1gPtiLUxq7/DcUstiz+p6KJC7Ukn8aoUg=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.2.1":{"name":"type-of-is","version":"3.2.1","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"asserts":"4.0.x"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"homepage":"https://github.com/stephenhandley/type-of-is","_id":"type-of-is@3.2.1","_shasum":"3b600173fd755853eeaf285a79500d5638ef83e0","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}],"dist":{"shasum":"3b600173fd755853eeaf285a79500d5638ef83e0","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.2.1.tgz","integrity":"sha512-txIs1RNJDzZsLBTh2mypbUP9A+lk1XoeleLcvHga5fUTMzTEUFd9hEL+9S83QzNAi10jH1Jfv2nu7h4nHLIX3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCm7fHgb99hTreRBDKMpPCNuG93mIuD9r+Mf7P0CfH8XAIhAMixWWYT0VlkAMoArx9MZeDvNOgVzpyCBPbQ65lpWwEq"}]}},"3.3.0":{"name":"type-of-is","version":"3.3.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"asserts":"4.0.x"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"homepage":"https://github.com/stephenhandley/type-of-is","_id":"type-of-is@3.3.0","_shasum":"9c5b816f4c2f4d7f069d48f11a67006bde7b92e6","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}],"dist":{"shasum":"9c5b816f4c2f4d7f069d48f11a67006bde7b92e6","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.3.0.tgz","integrity":"sha512-taMPfhY63SkdJDdhl1+9pMaNO5WKaq4sYyiZsec5Nv0HTAsl85YMchOD6saO1PPLLnSM6WiNv3QBq8h5j8prAw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/EKLVMgfA0vSxhZt1K2PxjMBA7O7PiDdHz5z+ybyIuwIhAKDXNbd2nlnyCGQewVFNkDV3bT2I6ezEjdLRoCrSHsQf"}]}},"3.3.1":{"name":"type-of-is","version":"3.3.1","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"asserts":"4.0.x"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"homepage":"https://github.com/stephenhandley/type-of-is","_id":"type-of-is@3.3.1","dist":{"shasum":"6877dd86dbf354d7b7e57e619848e5c36be549f4","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.3.1.tgz","integrity":"sha512-pOZzyNXIFkiExfQYzk0DelFxqdbcGsZUJJQBqf8JOTb3FHClIGMDf28//1+oNzmn+pall8rGZGJbc6eOJtF/ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGcN/ny5mFuM5nFqvJbV1HC7/uqYQFqnAfQm4v+Fyoe4AiBduqF4eYntTQOyPwWMj6y3J4Ig+s3tCW8JIiuE1H7bVw=="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.4.0":{"name":"type-of-is","version":"3.4.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"https://github.com/stephenhandley/type-of-is"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"node test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"asserts":"4.0.x"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"homepage":"https://github.com/stephenhandley/type-of-is","_id":"type-of-is@3.4.0","dist":{"shasum":"700dc096fbc9b86e4f79687beeb99e953d471508","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.4.0.tgz","integrity":"sha512-l+6CuMaTY3dnsN7M09kXenxO7rgT8bH1BkFkl+zqfYyMJidqQE2o7z9zcAqJpoKJLe4DXGkfgy7yoo/gyWaAwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeD+TQ/S88FyjgnqdQ7Hy1dBEZuq/h/XAmtNf6XgrxPQIgXUpOhXJh6dHzPCEf1tvwFIXxOoy+wMLUqKhOOcOo4yg="}]},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}]},"3.5.0":{"name":"type-of-is","version":"3.5.0","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/stephenhandley/type-of-is.git"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"mocha --no-timeouts --ui exports test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"mocha":"^3.2.0"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"gitHead":"3b6e0922d0fccd22844ce24c7a5e306d9f67b0c2","homepage":"https://github.com/stephenhandley/type-of-is#readme","_id":"type-of-is@3.5.0","_shasum":"566e764a30873461859577255d77116911eab6ab","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"dist":{"shasum":"566e764a30873461859577255d77116911eab6ab","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.5.0.tgz","integrity":"sha512-AusG05ajXmmctHwmT4jUDUBJf7tD8GUwDVcxTcCv6+Ya1Ru60U7APr2cDKA20E2O9yh2zNfAa0/kqhwevPvBIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHEcl6ODZjTpwHC1uqGcivxxUXqcYoUIX3A7Fk+uPD+wAiB3TOjTM03pzxphvxc+Er3prYyH4KoEENBTihH3wn5NcQ=="}]},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/type-of-is-3.5.0.tgz_1486499278597_0.2978000803850591"}},"3.5.1":{"name":"type-of-is","version":"3.5.1","description":"Determine and test types using constructor or {}.toString","license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/stephenhandley/type-of-is.git"},"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"scripts":{"test":"mocha --no-timeouts --ui exports test/test.js"},"keywords":["type","types","typeof","toString","type.of","type.is"],"directories":{"lib":".","test":"test"},"engines":{"node":">=0.10.5"},"devDependencies":{"mocha":"^3.2.0"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"gitHead":"7138a7e79f5af7c286bf8123f60843a91aaebf38","homepage":"https://github.com/stephenhandley/type-of-is#readme","_id":"type-of-is@3.5.1","_shasum":"eec2fc89b828dbf9900eb6416eee30f4fe0fcd31","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"stephenhandley","email":"stephen.handley@gmail.com"},"dist":{"shasum":"eec2fc89b828dbf9900eb6416eee30f4fe0fcd31","tarball":"https://registry.npmjs.org/type-of-is/-/type-of-is-3.5.1.tgz","integrity":"sha512-SOnx8xygcAh8lvDU2exnK2bomASfNjzB3Qz71s2tw9QnX8fkAo7aC+D0H7FV0HjRKj94CKV2Hi71kVkkO6nOxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE+TAV+8RQimDHZBwCuRpTjJMMjTaHNWx4BFI8V9BtAWAiEAxigd5lZKb24MamWl0o7jNHnfNS28PE8u1qnWf90EGx8="}]},"maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/type-of-is-3.5.1.tgz_1486499346383_0.2348173107020557"}}},"readme":"# Description\n\nSensible / unsurprising JavaScript type detection and comparison using a combination of ({}).toString and constructors.\n\n\n### Built in objects / primitives\n\n| obj | Type.of(obj) | Type.is(...) === true |\n| ------------------------- |:-------------:| ----------------------------- |\n| ```{ x : 2 }``` | Object | ```Type.is(obj, Object)``` |\n| ```function () {}``` | Function | ```Type.is(obj, Function)``` |\n| ```[1, 2, 3]``` | Array | ```Type.is(obj, Array)``` |\n| ```\"barf\"``` | String | ```Type.is(obj, String)``` |\n| ```true``` | Boolean | ```Type.is(obj, Boolean)``` |\n| ```10``` | Number | ```Type.is(obj, Number)``` |\n| ```new Date()``` | Date | ```Type.is(obj, Date)``` |\n| ```/abc/``` | RegExp | ```Type.is(obj, RegExp)``` |\n| ```new Error(\"barf!\")``` | Error | ```Type.is(obj, Error)``` |\n\n\n### Objects created via new\n\n```javascript\nfunction Person (name) {\n this.name = name;\n}\nPerson.prototype.barf = function () {\n return this.name + \" just barfed!\";\n};\n\nvar ralph = new Person('Ralph');\n\nType.of(ralph); // [Function: Person]\nType.is(ralph, Person); // true\nType.is(ralph, Object); // false\nType.instance(ralph, Person); // true\nType.instance(ralph, Object); // true\n```\n\n\n# Latest Version\n\n3.4.0\n\n\n# Installation\n\n```\nnpm install type-of-is\n```\n\nor in package.json\n\n```json\n{\n ...\n \"dependencies\": {\n \"type-of-is\": \"~3.4.0\"\n }\n}\n```\n\n\n# Usage\n\n```javascript\nvar Type = require('type-of-is');\n\nType.of(obj); // returns constructor type of an object\nType.string(obj); // provides type as String\nType.is(obj, type); // tests whether obj is of type (constructor or String)\nType.instance(obj, type); // wrapper of \"obj instanceof type\"\nType.extension(SomeCoffeeScriptClassThatExtendsBarf, SomeCoffeeScriptClassNamedBarf)\n\n// The top level Type export delegates to Type.of or Type.is based on argument count\n\nType(obj) === Type.of(obj);\nType(obj, type) === Type.is(obj, type);\n```\n\n\n# More examples\n\n```javascript\nvar Type = require('type-of-is');\n\n// Type.of(arg) and Type(one_argument) return constructor of type\nconsole.log(Type.of('hi there ok')); // [Function: String]\nconsole.log(Type.of(342)); // [Function: Number]\nconsole.log(Type.of({})); // [Function: Object]\nconsole.log(Type.of([1, 2, 3])); // [Function: Array]\nconsole.log(Type.of(null)); // null\nconsole.log(Type.of(undefined)); // undefined\nconsole.log(Type(true)); // [Function: Boolean]\nconsole.log(Type(function () {})); // [Function: Function]\nconsole.log(Type(/abcd/)); // [Function: RegExp]\nconsole.log(Type(new Date())); // [Function: Date]\nconsole.log(Type(new Error())); // [Function: Error]\n\n// Type.string(arg) returns the string name of constructor\nconsole.log(Type.string('hi there ok')); // \"String\"\nconsole.log(Type.string(342)); // \"Number\"\nconsole.log(Type.string({})); // \"Object\"\nconsole.log(Type.string([1, 2, 3])); // \"Array\"\nconsole.log(Type.string(null)); // \"null\"\nconsole.log(Type.string(undefined)); // \"undefined\"\nconsole.log(Type.string(true)); // \"Boolean\"\nconsole.log(Type.string(function () {})); // \"Function\"\nconsole.log(Type.string(/abcd/)); // \"RegExp\"\nconsole.log(Type.string(new Date())); // \"Date\"\nconsole.log(Type.string(new Error())); // \"Error\"\n\n// Type.is(object, type) and Type(object, type) tests object type\nconsole.log(Type.is(true, Boolean)); // true\nconsole.log(Type.is(\"1231\", Number)); // false\nconsole.log(Type.is(\"1231\", String)); // true\nconsole.log(Type.is(\"1231\", \"String\")); // true\nconsole.log(Type.is(\"1231\", Object)); // false\nconsole.log(Type([], Object)); // false\nconsole.log(Type({}, Object)); // true\nconsole.log(Type([], Array)); // true\nconsole.log(Type(new Date(), Date)); // true\nconsole.log(Type(new Date(), Object)); // false\n\nvar s = \"hihihi\";\nvar Stringy = Type.of(s);\nvar t = new Stringy(\"hihihi\");\nconsole.log((s == t)); // true\nconsole.log((s === t)); // false\n\n\n// User defined objects should be instances of Objects but also can get actual constructor type\nfunction Person (name) {\n this.name = name;\n}\nPerson.prototype.barf = function () {\n return this.name + \" just barfed!\";\n};\n\nvar ralph = new Person('Ralph');\n\nconsole.log(Type.of(ralph)); // [Function: Person]\nconsole.log(Type.is(ralph, Person)); // true\nconsole.log(Type.is(ralph, Object)); // false\nconsole.log(Type.instance(ralph, Person)); // true\nconsole.log(Type.instance(ralph, Object)); // true\n\n\n// arguments is weird edge case, there's no Arguments global but typeof arguments is \"arguments\"\n// type returned is Object, but not sure what would be preferable\n(function () {\n console.log(Type.of(arguments)); // [Function: Object]\n})();\n\n\n// other built-ins\nconsole.log(Type.of(Infinity)); // [Function: Number]\nconsole.log(Type.of(-Infinity)); // [Function: Number]\nconsole.log(Type.of(NaN)); // [Function: Number]\nconsole.log(Type.of(Math)); // [Function: Object]\nconsole.log(Type.of(JSON)); // [Function: Object]\n\n\n// Returning constructor as type allows it to be used to create new objects i.e.\nvar s = \"s\";\nvar t = new Type.of(s)(\"t\");\nconsole.log(t.toUpperCase()); // \"T\"\n\n// Type.any(obj, [Array, Of, Types]) and Type(obj, [Array, Of, Types]) should test whether\n// the object is any of the passed in types\nvar str = 'hihihi';\nconsole.log(Type.any(str, [String, Number, Array])); // true\nconsole.log(Type(str, [Array, RegExp])); // false\n\n// multi-frame dom\nvar iFrame = document.createElement('IFRAME');\ndocument.body.appendChild(iFrame);\nvar IFrameArray = window.frames[0].Array;\nvar array = new IFrameArray();\n\nconsole.log(array instanceof Array); //false\nconsole.log(array instanceof IFrameArray); //true;\nconsole.log(Type.of(array)); // Array\nconsole.log(Type.is(array, Array)); // false\nconsole.log(Type.is(array, \"Array\")); // true\n\n```\n\n\n# Rationale\n\nTry to iron over some of the surprises in JavaScript type detection\n\n1. typeof is unreliable / surprising in multiple cases (Array -> object, null -> object, etc.)\n\n2. constructor checking is unreliable in multi-frame dom environments\n\n3. type comparison using strings whose string case / formatting differs from constructor names introduces unnecessary complexity\n\n4. ({}).toString returns \"[object Object]\" for objects created via new rather than constructor name called with new\n\n\n# Links\n\nhttp://ecma262-5.com/ELS5_HTML.htm\n\nhttp://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/\n\nhttp://skilldrick.co.uk/2011/09/understanding-typeof-instanceof-and-constructor-in-javascript/\n\nhttp://javascriptweblog.wordpress.com/2010/09/27/the-secret-life-of-javascript-primitives/\n\nhttp://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/\n\nhttp://www.2ality.com/2011/11/improving-typeof.html\n\n\n# TODO\n\ncheck back on https://github.com/ariya/phantomjs/issues/11722\n\n#Build status\n\n[![build status](https://secure.travis-ci.org/stephenhandley/type-of-is.png)](http://travis-ci.org/stephenhandley/type-of-is)\n","maintainers":[{"name":"stephenhandley","email":"stephen.handley@gmail.com"}],"time":{"modified":"2022-06-28T00:44:10.030Z","created":"2012-07-30T21:44:15.053Z","0.0.2":"2012-07-30T21:44:19.524Z","1.0.0":"2012-09-28T17:08:45.347Z","1.1.0":"2012-09-28T21:45:56.505Z","2.0.0":"2012-09-28T23:14:41.960Z","3.0.0":"2013-03-04T11:52:15.688Z","3.1.0":"2013-03-05T03:51:53.519Z","3.1.2":"2013-05-01T03:37:32.373Z","3.1.3":"2013-06-17T21:26:45.896Z","3.2.0":"2013-10-03T23:59:38.434Z","3.2.1":"2014-06-06T07:43:25.399Z","3.3.0":"2014-06-09T22:09:24.012Z","3.3.1":"2015-01-25T01:44:40.925Z","3.4.0":"2015-01-25T20:31:46.326Z","3.5.0":"2017-02-07T20:27:58.825Z","3.5.1":"2017-02-07T20:29:06.629Z"},"author":{"name":"Stephen Handley","email":"stephen.handley@gmail.com","url":"http://person.sh"},"repository":{"type":"git","url":"git+https://github.com/stephenhandley/type-of-is.git"},"users":{"fgribreau":true,"maxogden":true,"chocolateboy":true,"realazthat":true},"homepage":"https://github.com/stephenhandley/type-of-is#readme","keywords":["type","types","typeof","toString","type.of","type.is"],"bugs":{"url":"http://github.com/stephenhandley/type-of-is/issues"},"license":"MIT","readmeFilename":"README.md"}