UNPKG

@adguard/aglint

Version:

Universal adblock filter list linter.

49 lines (47 loc) 1.16 kB
/* * AGLint v3.0.2 (build date: Mon, 08 Dec 2025 08:25:49 GMT) * (c) 2025 AdGuard Software Ltd. * Released under the MIT license * https://github.com/AdguardTeam/AGLint#readme */ /** * Checks whether the given value is undefined. * * @param value Value to check. * * @returns `true` if the value is 'undefined', `false` otherwise. */ const isUndefined = (value) => { return typeof value === 'undefined'; }; /** * Checks whether the given value is null. * * @param value Value to check. * * @returns `true` if the value is 'null', `false` otherwise. */ const isNull = (value) => { return value === null; }; /** * Checks whether the given value is a number. * * @param value Value to check. * * @returns `true` if the value is a number, `false` otherwise. */ const isNumber = (value) => { return typeof value === 'number' && !Number.isNaN(value); }; /** * Checks whether the given value is a string. * * @param value Value to check. * * @returns `true` if the value is a string, `false` otherwise. */ const isString = (value) => { return typeof value === 'string'; }; export { isNull, isNumber, isString, isUndefined };