Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yuenu/utils-collection

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yuenu/utils-collection - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

package.json
{
"name": "@yuenu/utils-collection",
"version": "1.0.3",
"version": "1.0.4",
"description": "utils collection",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -1,1 +0,20 @@

export * from './getMoneyNumbersFromString'
function getMoneyNumbersFromString(str) {
// make sure the input is a string
if (typeof str !== 'string') {
return '';
}
// remove all non-digit characters from the string
let digitsOnly = str.replace(/\D/g, '');
// if the first character is 0, remove it
if (digitsOnly.charAt(0) === '0' && digitsOnly.length > 1) {
digitsOnly = digitsOnly.slice(1);
}
return digitsOnly;
}
module.exports = {
getMoneyNumbersFromString
}
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