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

should-type

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

should-type - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

README.md

16

cjs/should-type.js

@@ -67,2 +67,5 @@ 'use strict';

function Type(type, cls, sub) {
if (!type) {
throw new Error('Type class must be initialized at least with `type` information');
}
this.type = type;

@@ -83,2 +86,15 @@ this.cls = cls;

return str.join(';');
},
toTryTypes: function() {
var _types = [];
if (this.sub) {
_types.push(new Type(this.type, this.cls, this.sub));
}
if (this.cls) {
_types.push(new Type(this.type, this.cls));
}
_types.push(new Type(this.type));
return _types;
}

@@ -85,0 +101,0 @@ };

@@ -65,2 +65,5 @@ var types = {

function Type(type, cls, sub) {
if (!type) {
throw new Error('Type class must be initialized at least with `type` information');
}
this.type = type;

@@ -81,2 +84,15 @@ this.cls = cls;

return str.join(';');
},
toTryTypes: function() {
var _types = [];
if (this.sub) {
_types.push(new Type(this.type, this.cls, this.sub));
}
if (this.cls) {
_types.push(new Type(this.type, this.cls));
}
_types.push(new Type(this.type));
return _types;
}

@@ -83,0 +99,0 @@ };

3

package.json
{
"name": "should-type",
"version": "1.1.0",
"version": "1.2.0",
"description": "Simple module to get instance type. Like a bit more advanced version of typeof",

@@ -35,4 +35,5 @@ "main": "cjs/should-type.js",

"eslint": "^3.0.0",
"eslint-config-shouldjs": "^1.0.2",
"rollup": "^0.34.3"
}
}
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