@csstools/css-parser-algorithms
Advanced tools
Comparing version
# Changes to CSS Parser Algorithms | ||
### 2.1.0 (March 25, 2023) | ||
- Add `replaceComponentValues` utility function. | ||
- Add `stringify` utility function. | ||
### 2.0.1 (January 28, 2023) | ||
@@ -4,0 +9,0 @@ |
@@ -29,4 +29,4 @@ import { CSSToken, TokenFunction } from '@csstools/css-tokenizer'; | ||
parent: ContainerNode; | ||
}, index: number | string) => boolean | void): boolean; | ||
toJSON(): any; | ||
}, index: number | string) => boolean | void): false | undefined; | ||
toJSON(): unknown; | ||
isFunctionNode(): this is FunctionNode; | ||
@@ -57,4 +57,4 @@ static isFunctionNode(x: unknown): x is FunctionNode; | ||
parent: ContainerNode; | ||
}, index: number | string) => boolean | void): boolean; | ||
toJSON(): any; | ||
}, index: number | string) => boolean | void): false | undefined; | ||
toJSON(): unknown; | ||
isSimpleBlockNode(): this is SimpleBlockNode; | ||
@@ -61,0 +61,0 @@ static isSimpleBlockNode(x: unknown): x is SimpleBlockNode; |
@@ -6,3 +6,5 @@ export * from './consume/consume-component-block-function'; | ||
export { gatherNodeAncestry } from './util/node-ancestry'; | ||
export { replaceComponentValues } from './util/replace-component-values'; | ||
export { stringify } from './util/stringify'; | ||
export { ComponentValueType } from './util/component-value-type'; | ||
export { isCommentNode, isFunctionNode, isSimpleBlockNode, isTokenNode, isWhitespaceNode, } from './util/type-predicates'; |
import { CSSToken, ParseError } from '@csstools/css-tokenizer'; | ||
export declare function parseComponentValue(tokens: Array<CSSToken>, options?: { | ||
onParseError?: (error: ParseError) => void; | ||
}): import("../consume/consume-component-block-function").ComponentValue; | ||
}): import("../consume/consume-component-block-function").ComponentValue | undefined; |
@@ -5,4 +5,4 @@ export interface walkable { | ||
parent: unknown; | ||
}, index: number | string) => boolean | void): any; | ||
}, index: number | string) => boolean | void): false | undefined; | ||
} | ||
export declare function gatherNodeAncestry(node: walkable): Map<unknown, unknown>; |
{ | ||
"name": "@csstools/css-parser-algorithms", | ||
"description": "Algorithms to help you parse CSS from an array of tokens.", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"contributors": [ | ||
@@ -45,12 +45,7 @@ { | ||
"scripts": { | ||
"prebuild": "npm run clean", | ||
"build": "rollup -c ../../rollup/default.mjs", | ||
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"", | ||
"lint": "npm run lint:eslint && npm run lint:package-json", | ||
"lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern", | ||
"lint:package-json": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run clean && npm run build && npm run test", | ||
"lint": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run build && npm run test", | ||
"stryker": "stryker run --logLevel error", | ||
"test": "node ./test/test.mjs", | ||
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs", | ||
"test": "node ./test/test.mjs && node ./test/_import.mjs && node ./test/_require.cjs", | ||
"test:rewrite-expects": "REWRITE_EXPECTS=true node ./test/test.mjs" | ||
@@ -57,0 +52,0 @@ }, |
@@ -14,3 +14,3 @@ # CSS Parser Algorithms | ||
```bash | ||
npm install postcss @csstools/css-parser-algorithms @csstools/css-tokenizer --save-dev | ||
npm install @csstools/css-parser-algorithms @csstools/css-tokenizer --save-dev | ||
``` | ||
@@ -17,0 +17,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
31069
4.17%17
13.33%234
4%