vanillajs-helpers

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS

View the Project on GitHub Tokimon/vanillajs-helpers

vanillajs-helpers > “hexToNumber”

External module: “hexToNumber”

Index

Functions


Functions

hexToNumber

hexToNumber(hex: string): number

Defined in hexToNumber.ts:15

Convert Hexadecimal into a number (eg. b4 => 180)

hexToNumber('ba'); // -> 186

Parameters:

Param Type Description
hex string Hex code to parse

Returns: number