tequery
Version:
text transform query
30 lines (29 loc) • 1.68 kB
TypeScript
export declare const len: (text: string | unknown[]) => number;
export declare const count: (text: string, regexStr: string | RegExp) => number;
export declare const _count: (regexStr: string | RegExp) => (text: string) => number;
export declare const lineNum: (text: string) => number;
export declare const ln: (text: string) => number;
export declare const pack: (text: string, n?: number) => string;
export declare const _pack: (n?: number | undefined) => (text: string) => string;
export declare const shiftl: (text: string, to?: string, n?: number) => string;
export declare const _shiftl: (to?: string | undefined, n?: number | undefined) => (text: string) => string;
export declare const shiftr: (text: string, to?: string, n?: number) => string;
export declare const _shiftr: (to?: string | undefined, n?: number | undefined) => (text: string) => string;
export declare const json: {
(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string;
(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string;
};
export declare const jsonf: (v: unknown) => string;
/** cell query */
declare const OP_SHIFT: readonly ["<", ">"];
declare const OP_PICK: readonly ["_", "."];
type OpShift = (typeof OP_SHIFT)[number];
type OpPick = (typeof OP_PICK)[number];
type CqOptionArg = {
spChars?: string;
opsShift?: OpShift[] | string;
opsPick?: OpPick[] | string;
};
export declare const cq: (text: string, option: string | CqOptionArg) => string;
export declare const _cq: (option: string | CqOptionArg) => (text: string) => string;
export {};