Converter Utility
Convert to X from Y.
CommonJS
const {toNumber} = require('@taufik-nurrohman/to');
console.log(toNumber('1'));
ECMAScript
import {toNumber} from '@taufik-nurrohman/to';
console.log(toNumber('1'));
Methods
toArray(any)
toArrayKey(value, array)
toArrayValue(key, array)
toBoolean(any)
toCaseCamel(string)
toCaseKebab(string, separator = '-')
toCaseLower(string)
toCasePascal(string)
toCaseUpper(string)
toCeil(number)
toCount(array|string)
toEdge(number, [min, max])
toFix(number)
toFloor(number)
toHTML(string, restoreQuote = true)
toJSON(any)
toNumber(string, base = 10)
toObjectCount(object)
toObjectEntries(object)
toObjectKey(value, object)
toObjectKeys(object)
toObjectValue(key, object)
toObjectValues(object)
toQuery(object)
toRound(number)
toString(any)
toString(number, base = 10)
toURL(string)
toValue(any)