
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.
Some commonly used js functions
import jsExt from 'js-ext';
// number
jsExt.pad(6); // '06'
jsExt.pad(44); // '44'
jsExt.pad(89, 4); // '0089'
jsExt.safeAdd(0.1, 0.2); // 0.3
jsExt.safeSub(0.3, 0.2); // 0.1
jsExt.safeMul(0.1, 0.2); // 0.02
jsExt.safeDiv(0.3, 0.1); // 3
// type
jsExt.isArray([1]);
jsExt.isBoolean(false);
jsExt.isDate(new Date());
jsExt.isError(new Error(''));
jsExt.isFunction(() => {});
jsExt.isNull(null);
jsExt.isNumber(0);
jsExt.isRegExp(/\d+/);
jsExt.isString('0');
jsExt.isUndefined(undefined);
// date
const da = new Date('1989-04-05T12:02:03Z');
jsExt.toChinaTimeString(da); // '20:02:03'
jsExt.toChinaDateString(da); // '1989-04-05 20:02:03'
jsExt.toChineseDateString(da); // '1989年04月05日 20:02:03'
jsExt.ts(da); // '19890405200203'
jsExt.ts8(da); // '19890405'
jsExt.ts6(da); // '200203'
// sleep
(async () => {
await jsExt.sleep(1000, 'say hi');
})();
<script src="https://cdn.jsdelivr.net/npm/almond@0.3.3/almond.min.js"></script>
<script src="./js-ext.bundle.js"></script>
<script>
const jsExt = require('js-ext');
console.log(jsExt.ts(new Date()));
</script>
FAQs
Some commonly used js functions
We found that js-ext 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.