🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@csstools/css-parser-algorithms

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@csstools/css-parser-algorithms - npm Package Compare versions

Comparing version

to
2.2.0

8

CHANGELOG.md
# Changes to CSS Parser Algorithms
### 2.2.0 (June 1, 2023)
- Add `state` to `walk` methods.
This makes it possible pass down information from a parent structure to children.
e.g. you can set `entry.state.isInCalcExpression = true` for `calc((10 + 5) / 2)` when walking the `FunctionNode` for `calc`.
### 2.1.1 (April 10, 2023)

@@ -7,3 +14,2 @@

### 2.1.0 (March 25, 2023)

@@ -10,0 +16,0 @@

10

dist/consume/consume-component-block-function.d.ts

@@ -26,6 +26,7 @@ import { CSSToken, TokenFunction } from '@csstools/css-tokenizer';

at(index: number | string): ComponentValue | undefined;
walk(cb: (entry: {
walk<T extends Record<string, unknown>>(cb: (entry: {
node: ComponentValue;
parent: ContainerNode;
}, index: number | string) => boolean | void): false | undefined;
state?: T;
}, index: number | string) => boolean | void, state?: T): false | undefined;
toJSON(): unknown;

@@ -54,6 +55,7 @@ isFunctionNode(): this is FunctionNode;

at(index: number | string): ComponentValue | undefined;
walk(cb: (entry: {
walk<T extends Record<string, unknown>>(cb: (entry: {
node: ComponentValue;
parent: ContainerNode;
}, index: number | string) => boolean | void): false | undefined;
state?: T;
}, index: number | string) => boolean | void, state?: T): false | undefined;
toJSON(): unknown;

@@ -60,0 +62,0 @@ isSimpleBlockNode(): this is SimpleBlockNode;

{
"name": "@csstools/css-parser-algorithms",
"description": "Algorithms to help you parse CSS from an array of tokens.",
"version": "2.1.1",
"version": "2.2.0",
"contributors": [

@@ -17,6 +17,12 @@ {

"license": "MIT",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/csstools"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/csstools"
},
{
"type": "opencollective",
"url": "https://opencollective.com/csstools"
}
],
"engines": {

@@ -23,0 +29,0 @@ "node": "^14 || ^16 || >=18"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet