Skip to content

Increasing version number

This tutorial is part of package functions documentation in Iconify Tools.

Function bumpVersion() is a simple function that increases version number.

It can be used to automatically increase version number when updating existing package.

Usage

Function has the following parameter:

  • version, string. Old version

Function returns updated version number.

Example

example.ts
tsimport { bumpVersion } from '@iconify/tools';

console.log(bumpVersion('1.0.0')); // 1.0.1
console.log(bumpVersion('2.1.3')); // 2.1.4
console.log(bumpVersion('2.0.0-beta.1')); // 2.0.0-beta.2

Released under the Apache 2.0 License.