STVL
Fallback when a value is not String.
Installation
Via NPM:
npm install stvl
Via Yarn:
yarn add stvl
Usage
const stvl = ; // When a value is not String, it will return fallback value.let a = ; // a = 0let b = ; // b = "X" // When a value is String, it will return that value.let c = ; // c = "A"let d = ; // d = "B"
API
stvl(value, fallbackValue)
value
A main value.
fallbackValue
A fallback value.