
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
enhance-object-property-names-getter
Advanced tools
Enhance Object with getAllPropertyNames and getNPropertyNames
Enhance Object
with getAllPropertyNames
and getNPropertyNames
Simply require/import enhance-object-property-names-getter
from npm/yarn
After requiring/importing, Object
will have new configurable descriptors:
Object.getOwnPropertyNames(document); // ['location'] (length:1)
Object.getNPropertyNames(document, 0); // [] (length:0)
Object.getNPropertyNames(document, 1); // ['location'] (length:1)
Object.getNPropertyNames(document, 2); // ['location', 'constructor'] (length:2)
Object.getNPropertyNames(document, 3); // ['location', 'constructor', ...] (length:235)
Object.getAllPropertyNames(document); // ['location', 'constructor', ...] (length:299)
You can also pass to both a final boolean argument to either use or avoid caching of properties (default:true)
Object.getOwnPropertyNames
gives you the own props of an object, sometimes you might want more properties that are inherited as part of the prototype chain. You can ask for all properties using getAllPropertyNames
by climbing up the chain to the final root, or climb only a fixed amount of levels using getNPropertyNames
.
FAQs
Enhance Object with getAllPropertyNames and getNPropertyNames
The npm package enhance-object-property-names-getter receives a total of 0 weekly downloads. As such, enhance-object-property-names-getter popularity was classified as not popular.
We found that enhance-object-property-names-getter 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
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.