Socket
Socket
Sign inDemoInstall

rttc

Package Overview
Dependencies
Maintainers
4
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rttc - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

test/validate.test.js

2

lib/helpers/coerce-primitive.js

@@ -8,4 +8,4 @@ /**

// only used by legacy methods
/**

@@ -12,0 +12,0 @@ * Run-time type checking. Given a set of typed inputs, ensure the run-time configured

@@ -9,4 +9,4 @@ /**

// only used by legacy methods
/**

@@ -13,0 +13,0 @@ * Given a type and primitive value, check that it matches.

@@ -56,7 +56,7 @@ /**

// Check `actual` value against expectedType
if (!expectedType.is(actual)){
if (!expectedType.is(coercedValue)){
// Invalid expected type. Try to coerce:
try {
coercedValue = expectedType.to(actual);
coercedValue = expectedType.to(coercedValue);
}

@@ -63,0 +63,0 @@ catch (e) {

{
"name": "rttc",
"version": "0.2.3",
"version": "0.2.4",
"description": "Runtime type-checking for JavaScript.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -252,3 +252,3 @@ # rttc

The usage of this module is changing, but backwards compatibility will be maintained up until the first major version bump (v1.0.0).
The usage of this module has been extended considerably, but backwards compatibility will be maintained up until the first major version bump (v1.0.0).
See tests for more details.

@@ -255,0 +255,0 @@

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