1.1.10 • Published 4 years ago

increment-last v1.1.10

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

incrementLast

Return string with the number in the end incremented

Usage: incrementLast(str: string, defaultNum?: number): string

import { incrementLast } from 'increment-last'

incrementLast('name1')
// Output: "name2"
incrementLast('name01')
// Output: "name02"
incrementLast('name') // When the given string does not end with number, the default number is 2
// Output: "name2"
incrementLast('name', 5) // The second argument is the default number to use when the given string does not end with number
// Output: "name5"
incrementLast('name1', 5) // defaultNum has no effect in this case
// Output: "name2"

This module exported from utilizes project.

1.1.10

4 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.6

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.11

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago