UNPKG

nigerian-mobile-validator

Version:

The most rigorous, up-to-date library for validating Nigerian mobile numbers. Fully NCC-compliant, and security-focused, with enterprise-grade features to prevent the business risks of validation failures in regulated industries.

47 lines (46 loc) 1.79 kB
/** * An enum indicating the environment our code is running in ie node, browser, or web worker */ export declare enum CurrentEnvironment { /** The code is running in a browser environment */ Browser = "Browser", /** The code is running in a Node.js environment */ Node = "Node", /** The code is running in a Web Worker environment */ WebWorker = "Webworker", /** The environment code is running in cannot be determined */ Unknown = "Unknown" } /** * Checks if we are running in a node, browser, or web worker environment */ export declare class RuntimeEnvironment { /** * Gets a boolen flag indicating if the code appears to be running in a browser environment. * * NOTE: Avoid using this getter and use {@link currentEnvironment} instead. */ static get isBrowserDocumentPresent(): boolean; /** * Gets a boolen flag indicating if the code appears to be running in a Node.js environment. * * NOTE: Avoid using this getter and use {@link currentEnvironment} instead. */ static get isNodeProcessPresent(): boolean; /** * Gets a boolen flag indicating if the code appears to be running in a Web Worker environment. * * NOTE: Avoid using this getter and use {@link currentEnvironment} instead. */ static get isWebWorkerConstructorPresent(): boolean; /** * Gets the most likely environment our code is running in ie node, browser, or web worker * * @returns A {@link CurrentEnvironment} enum indicating the environment our code is running in * i.e. Node, Browser, or Web worker * * @description * Resolves conflicts by setting priority order as Node > Browser > Web worker */ static get currentEnvironment(): CurrentEnvironment; }