Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
unbox-primitive
Advanced tools
Changelog
v1.0.2 - 2022-04-24
e6420b9
b90aff2
bcc39b9
eslint
, @ljharb/eslint-config
, object-inspect
, safe-publish-latest
, tape
a704a32
call-bind
instead of function-bind
0a609f1
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
, object-inspect
, safe-publish-latest
, tape
6a45317
eslint
, @ljharb/eslint-config
, aud
, auto-changelog
, object-inspect
, tape
795c76f
has-bigints
, has-symbols
257a065
Readme
Unbox a boxed JS primitive value. This module works cross-realm/iframe, does not depend on instanceof
or mutable properties, and works despite ES6 Symbol.toStringTag.
var unboxPrimitive = require('unbox-primitive');
var assert = require('assert');
assert.equal(unboxPrimitive(new Boolean(false)), false);
assert.equal(unboxPrimitive(new String('f')), 'f');
assert.equal(unboxPrimitive(new Number(42)), 42);
const s = Symbol();
assert.equal(unboxPrimitive(Object(s)), s);
assert.equal(unboxPrimitive(new BigInt(42)), 42n);
// any primitive, or non-boxed-primitive object, will throw
Simply clone the repo, npm install
, and run npm test
FAQs
Unbox a boxed JS primitive value.
The npm package unbox-primitive receives a total of 22,732,526 weekly downloads. As such, unbox-primitive popularity was classified as popular.
We found that unbox-primitive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.