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.0 to 1.0.1

src/getMoneyNumbersFromString.js

2

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

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

@@ -1,19 +0,1 @@

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
export * from './getMoneyNumbersFromString'
const getMoneyNumbersFromString = require('./index')
import {getMoneyNumbersFromString} from './index'

@@ -4,0 +4,0 @@ // console.log(getMoneyNumbersFromString('euwqio12391203'))

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