![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
bitcoincash-regex
Advanced tools
Readme
Regular expression for matching Bitcoin Cash (BCH) Legacy and CashAddr addresses.
~ ❯❯❯ npm install bitcoincash-regex
const bchRegex = require('bitcoincash-regex')
bchRegex().test('nodejsrocks 19hZx234vNtLazfx5J2bxHsiWEmeYE8a7k')
//=> true
bchRegex({exact: true}).test('nodejsrocks 19hZx234vNtLazfx5J2bxHsiWEmeYE8a7k foo')
//=> false
bchRegex({exact: true}).test('19hZx234vNtLazfx5J2bxHsiWEmeYE8a7k')
//=> true
bchRegex.format('cashaddr', {exact: true}).test('bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a')
//=> true
bchRegex.format('cashaddr', {exact: true}).test('19hZx234vNtLazfx5J2bxHsiWEmeYE8a7k')
//=> false
'nodejsrocks 19hZx234vNtLazfx5J2bxHsiWEmeYE8a7k unicorn bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a rainbow'.match(bchRegex());
//=> ['19hZx234vNtLazfx5J2bxHsiWEmeYE8a7k', 'bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a']
Returns a regex for matching BCH addresses.
Type: boolean
Default: false
(Matches any BCH address in a string)
Only match an exact string. Useful with RegExp#test()
to check if a string is an BCH address.
Returns a regex for matching specific BCH format addresses.
Type: string
Supported Formats: legacy
, cashaddr
Match a specific BCH address format.
Type: boolean
Default: false
(Matches any BCH address in a string)
Only match an exact string. Useful with RegExp#test()
to check if a string is an BCH address.
MIT © Nikolaos Kamarinakis
FAQs
Regular expression for matching Bitcoin Cash (BCH) Legacy and CashAddr addresses.
The npm package bitcoincash-regex receives a total of 199 weekly downloads. As such, bitcoincash-regex popularity was classified as not popular.
We found that bitcoincash-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.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.