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

static-type-js

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

static-type-js - npm Package Compare versions

Comparing version 0.1.3 to 0.2.3

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Prototype inheritance and type system for js",
"version": "0.1.3",
"version": "0.2.3",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -322,3 +322,3 @@ describe('Typejs', function () {

});
expect(message).toBe('"number" value: (1), is expected to be: "string" type.');
expect(message).toBe('TypeError key: username, value: "number" (1), is expected to be: "string" type.');
message = tryCatch(function () {

@@ -332,11 +332,11 @@ us.username = null

});
expect(message).toBe('"function" value: (function () { }), is expected to be: "string" type.');
expect(message).toBe('TypeError key: username, value: "function" (function () { }), is expected to be: "string" type.');
message = tryCatch(function () {
us.username = new RegExp;
});
expect(message).toBe('"regexp" value: (/(?:)/), is expected to be: "string" type.');
expect(message).toBe('TypeError key: username, value: "regexp" (/(?:)/), is expected to be: "string" type.');
message = tryCatch(function () {
us.date = 1;
});
expect(message).toBe('"number" value: (1), is expected to be: "date" type.');
expect(message).toBe('TypeError key: date, value: "number" (1), is expected to be: "date" type.');

@@ -398,3 +398,3 @@ message = tryCatch(function () {

});
expect(message).toBe('"string" value: (test), is expected to be: "number" type.');
expect(message).toBe('TypeError key: one, value: "string" (test), is expected to be: "number" type.');
});

@@ -401,0 +401,0 @@

@@ -17,3 +17,3 @@ (function (root, factory) {

if (!Object.preventExtensions) {
Object.preventExtensions = Object.freeze = function() {}; // lte 8 to avoid try catch speed
Object.preventExtensions = Object.freeze = function () {}; // lte 8 to avoid try catch speed
}

@@ -129,3 +129,3 @@ /**

} else if (Type.isInitialized(nVal) && !Type.assert(type, nVal)) {
throw new TypeError('"' + Type.getType(nVal) + '" value: (' + nVal + '), is expected to be: "' + type + '" type.');
throw new TypeError('TypeError key: ' + key + ', value: "' + Type.getType(nVal) + '" (' + nVal + '), is expected to be: "' + type + '" type.');
}

@@ -132,0 +132,0 @@ this.__dynamic__[key] = nVal;

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