README
util.constants
General programming constants and regex strings
Installation
This module uses yarn to manage dependencies and run scripts for development.
To install as an application dependency:
$ yarn add util.constants
To build the app and run all tests:
$ yarn run all
Overview
This module contains reusable string/number constants and regex patterns.
Constants
encoding- the default string encoding value used for buffers (utf8)failure- exit code for failure representing the number 127millisPerSecond- the number of milliseconds in one second (1000)nl- Unix newline character string '\n'sp- zero width non breaking space character (unicode u+200b)success- exit code for success representing the number 0
regex patterns
regexEmail- matches 99.99% of all email addresses in use todayregexNumber- matches a decimal number (e.g. 123, -123, -1.23)regexURL- matches a Uniform Resource Locator (URL)regexUUID- matches a universally unique id (UUID)