Socket
Socket
Sign inDemoInstall

ethereum-regex

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereum-regex - npm Package Compare versions

Comparing version 1.1.12 to 1.1.13

18

index.d.ts
declare namespace ethereumRegex {
interface Options {
/**
Only match an exact string. By default, it matches any ETH addresses in a string. Useful with `RegExp#test()` to check if a string is an ETH address.
@default false
*/
readonly exact?: boolean;
}
interface Options {
/**
Only match an exact string. By default, it matches any ETH addresses in a string. Useful with `RegExp#test()` to check if a string is an ETH address.
@default false
*/
readonly exact?: boolean;
}
}

@@ -20,4 +20,4 @@

*/
declare function ethereumRegex(options?: ethereumRegex.Options): RegExp;
declare function ethereumRegex(options?: ethereumRegex.Options): RegExp
export = ethereumRegex;
export = ethereumRegex
'use strict'
const re = '0x[a-fA-F0-9]{40}'
module.exports = opts => {
opts = opts || {}
return opts.exact ? new RegExp(`(?:^${re}$)`) : new RegExp(re, 'g')
module.exports = options => {
options = options || {}
return options.exact ? new RegExp(`(?:^${re}$)`) : new RegExp(re, 'g')
}
{
"name": "ethereum-regex",
"version": "1.1.12",
"version": "1.1.13",
"description": "Regular expression for matching Ethereum (ETH) addresses.",

@@ -13,3 +13,3 @@ "license": "MIT",

"engines": {
"node": ">=9"
"node": ">=10"
},

@@ -38,5 +38,5 @@ "main": "index.js",

"ava": "^3.5.2",
"tsd": "^0.11.0",
"xo": "^0.25.4"
"tsd": "^0.13.1",
"xo": "^0.32.1"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc