0.0.5 • Published 6 years ago

is-primitive-type v0.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

is-primitive

A primitive is data that is not an object and has no methods.

is-primitive is a JavaScript method that allows determine if a datatype is primitive or not.

JavaScript has 6 primitive datatypes:

  • String
  • Number
  • Null
  • Undefined
  • Boolean
  • Symbol

More information about JavaScript Primitive Types

How to install

npm install is-primitive-type

How to test

npm run test

Usage

var isPrimitive = require('is-primitive-type');

isPrimitive(null);
// returns true

isPrimitive([1, 2, 3]);
// returns false

isPrimitive({ a: 1, b: 2, c: 3 });
// returns false
0.0.5

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago