Socket
Socket
Sign inDemoInstall

is-primitive

Package Overview
Dependencies
0
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

15

index.js
/*!
* is-primitive <https://github.com/jonschlinkert/is-primitive>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Copyright (c) 2014-present, Jon Schlinkert.
* Released under the MIT License.

@@ -11,13 +11,6 @@ */

module.exports = function isPrimitive(val) {
switch (typeof val) {
case 'boolean':
case 'number':
case 'string':
case 'symbol':
case 'undefined':
return true;
default: {
return val === null;
}
if (typeof val === 'object') {
return val === null;
}
return typeof val !== 'function';
};
{
"name": "is-primitive",
"description": "Returns `true` if the value is a primitive. ",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://github.com/jonschlinkert/is-primitive",

@@ -29,2 +29,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"devDependencies": {
"benchmark": "^2.1.4",
"gulp-format-md": "^1.0.0",

@@ -56,5 +57,5 @@ "mocha": "^3.5.3"

"list": [
"kind-of",
"is-number",
"is-plain-object"
"is-plain-object",
"kind-of"
]

@@ -61,0 +62,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc