Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

type-detect

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

type-detect - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

5

History.md
0.1.2 / 2013-11-30
==================
* Library: constructor with new
0.1.1 / 2013-10-10

@@ -3,0 +8,0 @@ ==================

9

lib/type.js

@@ -37,3 +37,3 @@ /*!

function getType (obj) {
function getType(obj) {
var str = Object.prototype.toString.call(obj);

@@ -60,3 +60,4 @@ if (natives[str]) return natives[str];

function Library () {
function Library() {
if (!(this instanceof Library)) return new Library();
this.tests = {};

@@ -109,3 +110,3 @@ }

Library.prototype.define = function (type, test) {
Library.prototype.define = function(type, test) {
if (arguments.length === 1) return this.tests[type];

@@ -134,3 +135,3 @@ this.tests[type] = test;

Library.prototype.test = function (obj, type) {
Library.prototype.test = function(obj, type) {
if (type === getType(obj)) return true;

@@ -137,0 +138,0 @@ var test = this.tests[type];

{
"name": "type-detect"
, "version": "0.1.1"
, "version": "0.1.2"
, "description": "Improved typeof detection for node.js and the browser."

@@ -5,0 +5,0 @@ , "author": "Jake Luer <jake@alogicalparadox.com> (http://alogicalparadox.com)"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc