UNPKG

@ibgib/helper-gib

Version:

common helper/utils/etc used in ibgib libs. Node v19+ needed for heavily-used isomorphic webcrypto hashing consumed in both node and browsers.

60 lines 2.16 kB
/** * @internal * Used internally for logging. */ export declare const HELPER_LOG_A_LOT = false; export declare const DEFAULT_UUID: undefined; export declare const UUID_REGEXP: RegExp; /** * regular expression for a classname. * * Used in witnesses atm. */ export declare const CLASSNAME_REGEXP: RegExp; /** * capture groups for expected (in various places). will return `null` if * does not have an id section like `(E: abcdef32chars)`. */ export declare const ERROR_MSG_WITH_ID_CAPTURE_GROUPS_REGEXP: RegExp; export declare const ERROR_MSG_LOCATION_ONLY_REGEXP: RegExp; /** * RegExp for a hexadecimal string of length 32 */ export declare const HEXADECIMAL_HASH_STRING_REGEXP_32: RegExp; /** * RegExp for a hexadecimal string of length 64 */ export declare const HEXADECIMAL_HASH_STRING_REGEXP_64: RegExp; /** * When you have a comma-delimited list of word characters and maybe some specials. * * @see {@link COMMA_DELIMITED_SIMPLE_STRINGS_REGEXP_DESCRIPTION} */ export declare const COMMA_DELIMITED_SIMPLE_STRINGS_REGEXP: RegExp; /** * Human-readable description to {@link COMMA_DELIMITED_SIMPLE_STRINGS_REGEXP} * * It is meant to be used with validation errors helper. * * **WARNING** obviously this can get out of sync. */ export declare const COMMA_DELIMITED_SIMPLE_STRINGS_REGEXP_DESCRIPTION = "text must only be comma-delimited, no-spaces simple words like \"comment,link,pic,x,under_score,hyphens-ok-too\""; /** * When expressing ibgib data paths, this will be used as the delimiter * to indicate a sub-object. * * # notes * * This should be used with the understanding that having overly-complex data * maps is an indication that the ibgib may possibly be better designed as * multiple ibgibs linked via their rel8ns. * * That said, I think it will be common for grouping settings, especially * mapping from external sources (API, SDK, etc.). */ export declare const DEFAULT_DATA_PATH_DELIMITER = "/"; /** * If a string has only non-alphanumerics, this may be returned when getting a safer substring. */ export declare const ONLY_HAS_NON_ALPHANUMERICS = "_nonalphanumerics_"; //# sourceMappingURL=constants.d.mts.map