Skip to content

inspect-js/is-boxed-primitive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-boxed-primitive Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Polyfill/shim for node's util.isBoxedPrimitive()

Example

var isBoxedPrimitive = require('is-boxed-primitive');
var assert = require('assert');

[
	undefined,
	null,
	true,
	false,
	0,
	NaN,
	Infinity,
	0n,
	'',
	'foo',
	Symbol(),
	Symbol.iterator,
].forEach((v) => {
	assert(!isBoxedPrimitive(v)); // primitive form is not boxed
	if (v != null) {
		assert(isBoxedPrimitive(Object(v))); // object form is boxed
	}
});

Tests

Simply clone the repo, npm install, and run npm test

About

Polyfill/shim for node's `util.types.isBoxedPrimitive()`

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy