
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
js-prototypes
Advanced tools
Important although missing Javascript prototypes
Think there is an important, useful prototype that is missing? Let us know by opening an issue.
The object prototypes can be used on all object extensions.
npm install --save js-prototypesimport JSPrototypes from "js-prototypes"import {ObjectPrototypes, ArrayPrototypes, StringPrototypes} from "js-prototypes"JSPrototypes.all() will add all prototypesObjectPrototypes.all() will add all object prototypesArrayPrototypes.all() will add all array prototypesStringPrototypes.all() will add all string prototypesfalse as the only parametertype.method() where type is the type of prototype, and method is the prototype's name.
ArrayPrototypes.shuffle()| Method | Description |
|---|---|
| clone(obj) | Value level cloning of non-circular objects |
| equals(obj1, obj2) | Checks if value of objects are equal, for non-circular objects |
| forEach(obj, callback(value, key)) | Loops through an object, and executes a callback |
| values(obj) | Converts an object to an array of values. Proposed for ES7 |
| size(obj) | How many properties does an object have |
| Method | Description |
|---|---|
| shuffle() | Shuffles an array |
| top() | Top of the array, without popping |
| unique() | Returns an array of unique values, with no order changes |
| equals(array) | Returns true if both arrays are equal, false if they are not |
| Method | Description |
|---|---|
| capitalize() | Capitalizes a string |
FAQs
Important although missing Javascript prototypes
We found that js-prototypes 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
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.