nth-check
Version:
Parses and compiles CSS nth-checks to highly optimized functions.
9 lines • 380 B
TypeScript
/**
* Parses an expression.
* @param formula CSS nth-formula to parse.
* @throws {Error} An `Error` if parsing fails.
* @returns An array containing the integer step size and the integer offset of the nth rule.
* @example nthCheck.parse("2n+3"); // returns [2, 3]
*/
export declare function parse(formula: string): [a: number, b: number];
//# sourceMappingURL=parse.d.ts.map