New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

can-type

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

can-type - npm Package Compare versions

Comparing version 1.0.0-pre.1 to 1.0.0-pre.2

27

can-type-test.js

@@ -5,2 +5,3 @@ var canSymbol = require("can-symbol");

var QUnit = require("steal-qunit");
var dev = require("can-test-helpers").dev;

@@ -48,10 +49,2 @@ QUnit.module('can-type - Type methods');

var matrix = {
check: {
check: strictEqual,
throws: throwsBecauseOfWrongType
},
maybe: {
check: strictEqual,
throws: throwsBecauseOfWrongType
},
convert: {

@@ -65,2 +58,16 @@ check: equal

// type checking should not throw in production
if(process.env.NODE_ENV !== 'production') {
canReflect.assignMap(matrix, {
check: {
check: strictEqual,
throws: throwsBecauseOfWrongType
},
maybe: {
check: strictEqual,
throws: throwsBecauseOfWrongType
}
});
}
var dateAsNumber = new Date(1815, 11, 10).getTime();

@@ -145,3 +152,3 @@

QUnit.test("type.late(fn) where the underlying type value is a builtin becomes a strict type", function(assert) {
dev.devOnlyTest("type.late(fn) where the underlying type value is a builtin becomes a strict type", function(assert) {
var typeType = type.late(() => Number);

@@ -155,3 +162,3 @@ var result = canReflect.convert(45, typeType);

} catch(err) {
assert.ok(err, "Got an error becomes it is strict");
assert.ok(err, "Got an error because it is strict");
}

@@ -158,0 +165,0 @@ });

@@ -165,2 +165,8 @@ var canReflect = require("can-reflect");

// type checking should not throw in production
if(process.env.NODE_ENV === 'production') {
exports.check = exports.convert;
exports.maybe = exports.maybeConvert;
}
exports.Any = Any;

@@ -167,0 +173,0 @@ exports.late = late;

{
"name": "can-type",
"version": "1.0.0-pre.1",
"version": "1.0.0-pre.2",
"description": "Type definitions",

@@ -36,2 +36,3 @@ "homepage": "https://canjs.com/doc/can-type.html",

"devDependencies": {
"can-test-helpers": "^1.1.4",
"jshint": "^2.9.1",

@@ -38,0 +39,0 @@ "steal": "^2.1.6",

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