parsestr-numarr
v1.0.4
Published
parsing array of strings in numbers to numbers and split the string with given value and converts strings in numbers to numbers of array
Downloads
3
Maintainers
Readme
parsestr-numarr
- Converts an array of numbers(in String) to number (eg. convertStrToArrNum(['1','2,'text']) => [1,2,'text'])
- Converts a string which we split with given value where the string in digits are converted to digits (eg. convertStrToArrNum('9 23 3 52 da2 2sd 10', ' ') => [9,23,3,52,'da2','2sd',10]) --which splits the array by space(' ') and also converts the Number(In string) to Number
Main Advantage: while calculating for the Mean, Median etc... so we need to add the values in the array, but sometimes we failed to see whether the given element in the array is string or number(Especially when dealing with large number of array values or large number of values in string which we need to split manually and add it ---> for that kind of purpose it will be very helpful)
Installation
Install via NPM:
npm install parsestr-numarr
Usage
javascript
var myApp = require("parsestr-numarr");
myApp.convertstrtoarrnum(); // print and return Array of Numbers"
TypeScript
import * as myApp from 'parsestr-numarr';
myApp.convertstrtoarrnum(); // print and return Array of Numbers"
License
This project is licensed under the terms of the MIT license.