string-left-number-right
v1.0.0
Published
Check if the string contains letters on the left and numbers on the right side
Downloads
3
Maintainers
Readme
string-left-number-right
Check if a string contains letters on the left and numbers on the right side
Install
$ npm install string-left-number-right
Usage
const stringLeftNumberRight = require('string-left-number-right');
stringLeftNumberRight('orange8888');
//=> true
stringLeftNumberRight('orange');
//=> false
stringLeftNumberRight('8888orange');
//=> false
stringLeftNumberRight('8888');
//=> false
stringLeftNumberRight('orange8888abc');
//=> false
stringLeftNumberRight(8888);
//=> undefined
Note: This module doesn't consider whitespace. Please consider trim the string beforehand.
License
MIT © JeffMinsungKim