split-numeric
A library that splits a string into an array containing all leading numeric digits as one value and the rest (non-numeric) of the string as the second value.
Last updated a year ago by ioedeveloper .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install split-numeric 
SYNC missed versions from official npm registry.

Split-Numeric

travis build
A javascript library that splits a string into an array containing all leading numeric digits as one value and the rest (non-numeric) of the string as the second value.

How To Use

1. Install

npm install split-numeric

2. Import

    // ES6 import
    import { split as splitNumeric } from 'split-numeric';

    // Older versions
    const splitNumeric = require('split-numeric').split;

3. Make use (Examples)

    console.log(splitNumeric("20pt10"));
    // ['20', 'pt10']
    
    console.log(splitNumeric("pt10"));
    // ['', 'pt10']

    console.log(splitNumeric("01"));
    // ['01', '']

    console.log(splitNumeric("300,5"));
    // ['300', ',5']

Current Tags

  • 1.3.0                                ...           latest (a year ago)

4 Versions

  • 1.3.0                                ...           a year ago
  • 1.2.0                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |