UNPKG

@visulima/fs

Version:

Human friendly file system utilities for Node.js

43 lines (42 loc) 1.29 kB
/** * Constant to check if the path is visible to the calling process. * Corresponds to `node:fs.constants.F_OK`. */ export declare const F_OK: number; /** * Constant to check if the path is readable to the calling process. * Corresponds to `node:fs.constants.R_OK`. */ export declare const R_OK: number; /** * Constant to check if the path is writable to the calling process. * Corresponds to `node:fs.constants.W_OK`. */ export declare const W_OK: number; /** * Constant to check if the path is executable by the calling process. * Corresponds to `node:fs.constants.X_OK`. */ export declare const X_OK: number; /** * A special symbol that can be returned by the matcher function in `findUp` or `findUpSync` * to stop the search process prematurely. */ export declare const FIND_UP_STOP: symbol; /** * Regular expression for stripping comments from JSON. * Matches: * 1. Quoted strings: "example \"escaped\" string" * 2. Single-line comments: // comment * 3. Multi-line comments: /* comment *\/ * @example * const json = `{ * // comment * "key": "value" // comment * }`; * json.replace(INTERNAL_STRIP_JSON_REGEX, (match) => * /^"/.test(match) ? match : '' * ); * // Result: { "key": "value" } */ export declare const INTERNAL_STRIP_JSON_REGEX: RegExp;