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

typeforce

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typeforce - npm Package Compare versions

Comparing version 1.8.4 to 1.8.5

10

errors.js

@@ -82,3 +82,3 @@ var inherits = require('inherits')

function getFunctionName (fn) {
function getTypeName (fn) {
return fn.name || fn.toString().match(/function (.*?)\s*\(/)[1]

@@ -88,5 +88,3 @@ }

function getValueTypeName (value) {
if (native.Null(value)) return ''
return getFunctionName(value.constructor)
return native.Null(value) ? '' : getTypeName(value.constructor)
}

@@ -98,3 +96,2 @@

if (value && native.Object(value)) return ''
return value

@@ -104,3 +101,3 @@ }

function tfJSON (type) {
if (native.Function(type)) return type.toJSON ? type.toJSON() : getFunctionName(type)
if (native.Function(type)) return type.toJSON ? type.toJSON() : getTypeName(type)
if (native.Array(type)) return 'Array'

@@ -133,4 +130,3 @@ if (type && native.Object(type)) return 'Object'

tfJSON: tfJSON,
getFunctionName: getFunctionName,
getValueTypeName: getValueTypeName
}
{
"name": "typeforce",
"version": "1.8.4",
"version": "1.8.5",
"description": "Another biased type checking solution for Javascript",

@@ -5,0 +5,0 @@ "keywords": [

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