Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
symbol.prototype.description
Advanced tools
Spec-compliant shim for Symbol.prototype.description proposal.
An ECMAScript spec-compliant Symbol.prototype.description
shim. Invoke its "shim" method to shim Symbol.prototype.description if it is unavailable.
Note: Symbol#description
requires a true ES6 environment, specifically one with native Symbols (eg, node >= v11.15.0)
This package implements the es-shim API interface. It works in an ES6-supported environment and complies with the spec.
Most common usage:
var description = require('symbol.prototype.description');
var assert = require('assert');
assert(description(Symbol('foo')) === 'foo');
assert(description(Symbol()) === undefined);
assert(description(Symbol(undefined)) === undefined);
assert(description(Symbol(null)) === 'null');
if (!('description' in Symbol.prototype)) {
// note: this should be the empty string, but in many engines,
// it is impossible to distinguish Symbol() and Symbol('')
// without globally replacing `Symbol`
assert(description(Symbol('')) === undefined);
description.shim();
}
assert(description(Symbol('foo')) === Symbol('foo').description);
assert(description(Symbol()) === Symbol().description);
assert(description(Symbol(undefined)) === Symbol(undefined).description);
assert(description(Symbol(null)) === Symbol(null).description);
assert(Symbol('').description === ''); // this works fine!
Simply clone the repo, npm install
, and run npm test
v1.0.7 - 2024-12-18
gopd
and es-object-atoms
babe493
@es-shims/api
, @ljharb/eslint-config
, auto-changelog
, hasown
, tape
4ecdf7b
call-bind
, has-symbols
, object.getownpropertydescriptors
3f32d5d
aud
with npm audit
fc695b1
0101aa6
FAQs
Spec-compliant shim for Symbol.prototype.description proposal.
The npm package symbol.prototype.description receives a total of 758,399 weekly downloads. As such, symbol.prototype.description popularity was classified as popular.
We found that symbol.prototype.description demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.