@yuenu/utils-collection
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"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')) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1791
5