1.0.13 • Published 4 years ago

string-checker-lib v1.0.13

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

My first npm package with String test Functions

Function-List:

StringNotEmpty(str) - Test (empty,null, only whitespace or undefined) String
RemoveWhitespace(str) - Remove all Whitespace in String
csv2array(str,char=',') - CSV String to array
array2csv(arr,char=',') - Array back to CSV String
getNumbersArray(str) - Extracts all numbers from the string and returns an array

Installation:

npm install string-checker-lib

Usage:

var str = require('string-checker-lib');

var nmixed = "  AA20c6/#600MM1000-+'<55>'";
var a = str.getNumbersArray(nmixed);

a.forEach(function(ele,index) {
  console.log(index+":"+ele);
});

output:
0:20
1:6
2:600
3:1000
4:55
1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago