
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.
Check your data against regular expressions or known keywords (see Keyword section). Different versions for different platforms are availible.
Currently these plugins are stable:
I wrote a really short blog post about the project a while ago, which can be read at rthor.is/javascript/cross-plugin-javascript-project-isjs. Note that some code examples are out of date.
cc (Credit cards)
Works for:
American Express
Discover
MasterCard
Visa
or any
// Example (vanilla JS)
is('0000000000000000', 'cc:any'); // Returns true
is('4000000000000000', 'cc:Visa'); // Returns true
datetime (Date and time)
Format: 1996-12-19T16:39:57-08:00
// Example (vanilla JS)
is('1996-12-19T16:39:57-08:00', 'datetime'); // Returns true
isbn (ISBN)
ISBN 10
// Example (vanilla JS)
is('0-85131-041-9', 'isbn'); // Returns true
is('0851310419', 'isbn'); // Returns true
ISBN 13
// Example (vanilla JS)
is('978-1-56619-909-4', 'isbn'); // Returns true
is('9781566199094', 'isbn'); // Returns true
latlng (Latitude and longitude)
Latitude
// Example (vanilla JS)
is('64.163296', 'latlng'); // Returns true
Longitude
// Example (vanilla JS)
is('-21.859328', 'latlng'); // Returns true
phone (Phone numbers)
Argentina (ar)
Australia (au)
France (fr)
Iceland (is)
United Kingdom (uk)
United States of America (us)
// Example (vanilla JS)
is('+354 000-0000', 'phone:is'); // Returns true
is('000-0000', 'phone:is'); // Returns true
is('0000000', 'phone:is'); // Returns true
zip:'two letter ISO 3166 country code' (Zip codes for countries)
Argentina (ar)
Australia (au)
Austria (at)
Belgium (be)
Brazil (br)
Canada (ca)
Danmark (dk)
Germany (de)
Great Britain (gb)
Hungry (hu)
Iceland (is)
Italy (it)
Japan (jp)
Luxembourg (lu)
Nertherland (nl)
Polland (pl)
Spain (es)
Sweden (se)
United States of America (us)
// Example (vanilla JS)
is('112', 'zip:is'); // Returns true
is('32044', 'zip:us'); // Returns true
The second parameter can point to a function within the check.fn object. It can also be a regular user defined function accepting a single argument which can be used for some complex (or simple) validation.
// Example (vanilla JS)
is(42, function ( num ) {
return num === 20; // returns false
});
The expression argument can be an actual regular expression.
// Example (vanilla JS)
is('love', /.+/); // returns true
Add a Luhn algorithm as a check function. Thanks everyone who pointed out the need for it.
Fix the README.
Rename the regex obj to check. It just makes more sense since we now have function tests.
All regular expressions are unit tested.
Added functionality to validate via functions. The second argument can now either be a regular function accepting a single argument or a string pointing to a function within the regex.fn object.
Current functions include: even, odd, regexp, ok and function.
phone has become an object so calling it requires a two letter ISO 3166 country code. For example validating Icelandic phone numbers in vanilla JS is now done thusly: is('+354 000-0000', 'phone:is'). In addition a few more countries were added.
cc - pretty much same thing happend as with the phone thing.
FAQs
Check your data against regular expressions or known keywords.
The npm package isjs receives a total of 251 weekly downloads. As such, isjs popularity was classified as not popular.
We found that isjs 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.