extract-last-number
v1.1.10
Published
Extract last number from given string. return array with the string without the number, and the number himself
Downloads
4
Maintainers
Readme
extractLastNumber
Extract last number from given string. return array with the string without the number, and the number himself
Usage: extractLastNumber(str: string): [string, number]
import { extractLastNumber } from 'extract-last-number'
extractLastNumber('name1')
// Output: ["name", 1]
extractLastNumber('name')
// Output: ["name", null]
extractLastNumber('name01')
// Output: ["name0", 1]
This module exported from utilizes project.