
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
bound-native-methods
Advanced tools
Bound native virtual methods to be used together with ES7 :: bind operator.
This library exports a collection of bound native virtual methods - static methods of JavaScript standard built-in objects in their bound form - so that they can be used together with the proposed bind operator.
$ npm install bound-native-methods
import * from 'bound-native-methods';
// Or, be more specific and cut down the build size: //
import {assign, keys} from 'bound-native-methods/object';
0::isInteger();
// true
[3, 6, 9]::max()::is(9);
// true
{'2015-06-01T15:30:00.000Z': 300}::assign({'2015-07-01T15:30:00.000Z': 42})
::keys()
.map(x => x::toUnixOffset())
::toJSON();
// [1433172600000,1435764600000]
Most static methods have been exported as is, but a few have been renamed or excluded to better fit the context:
| Native Form | Bound Form |
|---|---|
| Object.getPrototypeOf() | ::getPrototype() |
| Object.setPrototypeOf() | ::setPrototype() |
| Native Form | Bound Form |
|---|---|
| Symbol.for() | ::toSymbol() [1] |
| Symbol.keyFor() | ::key() |
| Native Form | Bound Form |
|---|---|
| Number.parseFloat() | ::toFloat() [1] |
| Number.parseInt() | ::toInt() [1] |
| Native Form | Bound Form |
|---|---|
| Math.pow() [2] | × |
| Math.random() | × |
| Native Form | Bound Form |
|---|---|
| Date.UTC() | × |
| Date.now() | × |
| Date.parse() | ::toUnixOffset() [1] |
| Native Form | Bound Form |
|---|---|
| Array.from() | × |
| Array.of() | × |
| Native Form | Bound Form |
|---|---|
| JSON.parse() | ::toObject() [1] |
| JSON.stringify() | ::toJSON() [1] |
Notes:
- Bound methods whose names start with "to..." are to be applied to strings (with the exception of
::toJSON()which can be applied to a variety of data types)- Please use the exponentiation operator
**instead
MIT © G. Kay Lee
FAQs
Bound native virtual methods to be used together with ES7 :: bind operator.
We found that bound-native-methods 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.