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 8.1.6 to 8.1.7

10

lib/get-display-type.js

@@ -6,4 +6,4 @@ /**

var _ = require('lodash');
var TYPES = require('./helpers/types');
/**

@@ -18,2 +18,9 @@ * Given a value, return a human-readable type string representing **its type**.

// `undefined` should take precedence over special exemplar syntax
// (i.e. '===')
if (_.isUndefined(val)) return 'undefined';
if (TYPES.json.isExemplar(val)) return 'json';
if (TYPES.lamda.isExemplar(val)) return 'lamda';
if (TYPES.ref.isExemplar(val)) return 'ref';
if (_.isEqual(val, Infinity) || _.isEqual(val, -Infinity) || _.isNaN(val)) {

@@ -26,3 +33,2 @@ return 'invalid number';

if (_.isNull(val)) return 'null';
if (_.isUndefined(val)) return 'undefined';
if (_.isArray(val)) return 'array';

@@ -29,0 +35,0 @@ if (_.isFunction(val)) return 'function';

2

package.json
{
"name": "rttc",
"version": "8.1.6",
"version": "8.1.7",
"description": "Runtime type-checking for JavaScript.",

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

@@ -411,3 +411,4 @@ # rttc

Given a value, return its type as a human-readable string (this is not limited to rttc types-- it can return strings like `"Error"` and `"Date"`)
Given a value, return its type as a human-readable string (this is not limited to rttc types-- it can return strings like `"Error"` and `"Date"`).
If special rttc exemplar syntax is used, it is respected.

@@ -414,0 +415,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