
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
github-username-regex
Advanced tools
Stringify the value with appending its type: 10 → '10 (number)'
import appendType from 'append-type';
appendType('123'); //=> '123 (string)'
appendType(123); //=> '123 (number)'
npm install append-type
bower install append-type
value: any type
Return: String
Essentially, it returns String(value) + ' (' + typeof value + ')'.
appendType(() => {}); //=> '() => {} (function)'
When it takes null / undefined, it returns 'null' / 'undefined'.
appendType(null); //=> 'null'
appendType(undefined); //=> 'undefined'
This module is useful for making TypeError error messages.
function reverse(v) {
if (typeof v !== 'boolean') {
throw new TypeError(`Expected a Boolean value, but got ${appendType(v)}.`);
}
return !v;
};
reverse(1); //=> TypeError: Expected a Boolean value, but got 1 (number).
Copyright (c) 2016 Shinnosuke Watanabe
Licensed under the MIT License.
FAQs
A regular expression that only matches a valid Github username
The npm package github-username-regex receives a total of 3,827 weekly downloads. As such, github-username-regex popularity was classified as popular.
We found that github-username-regex 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.