-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- Token
-
Base token, every token extends this one.
-
Group ⇐
Token -
A grouping token for lists, blocks, expressions, etc.
-
Block ⇐
Group -
A shorthand way to create blocks.
-
Selector ⇐
Token -
A token to express selectors.
-
Property ⇐
Token -
A token to express properties.
-
Value ⇐
Token -
A token to express values.
-
parse(input) ⇒
Tree -
Parse a text or buffer into a token tree.
Base token, every token extends this one.
Kind: global class
| Param | Type | Default | Description |
|---|---|---|---|
| value | Object |
{} |
Values of the token. |
| children | Array |
[ |
Children tokens. |
| meta | Object |
{} |
Metadata options. |
Append a new child token and redelegate.
Kind: instance method of Token
| Param | Type | Description |
|---|---|---|
| item | Token |
Token to add. |
Turn the token into a CSS-formatted string.
Kind: instance method of Token
Returns: String - Token rendered into a string.
Group ⇐ Token
A grouping token for lists, blocks, expressions, etc.
Kind: global class
Extends: Token
| Param | Type | Default | Description |
|---|---|---|---|
| value | Object |
{} |
Values of the token. |
| children | Array |
[ |
Children tokens. |
| meta | Object |
{} |
Metadata options. |
| meta.sep | String |
'' |
Seperator for children. |
| meta.start | String |
'{' |
Starting content for group. |
| meta.end | String |
'}' |
Ending content for group. |
Append a new child token and redelegate.
Kind: instance method of Group
| Param | Type | Description |
|---|---|---|
| item | Token |
Token to add. |
Turn the token into a CSS-formatted string.
Kind: instance method of Group
Overrides: render
Returns: String - Token rendered into a string.
Block ⇐ Group
A shorthand way to create blocks.
Kind: global class
Extends: Group
| Param | Type | Default | Description |
|---|---|---|---|
| children | Array |
[ |
Children tokens. |
| meta | Object |
{} |
Metadata options. |
Append a new child token and redelegate.
Kind: instance method of Block
| Param | Type | Description |
|---|---|---|
| item | Token |
Token to add. |
Turn the token into a CSS-formatted string.
Kind: instance method of Block
Returns: String - Token rendered into a string.
Selector ⇐ Token
A token to express selectors.
Kind: global class
Extends: Token
| Param | Type | Default | Description |
|---|---|---|---|
| value | Object |
{} |
Values of the token. |
| meta | Object |
{} |
Metadata options. |
Append a new child token and redelegate.
Kind: instance method of Selector
| Param | Type | Description |
|---|---|---|
| item | Token |
Token to add. |
Turn the token into a CSS-formatted string.
Kind: instance method of Selector
Overrides: render
Returns: String - Token rendered into a string.
Property ⇐ Token
A token to express properties.
Kind: global class
Extends: Token
| Param | Type | Default | Description |
|---|---|---|---|
| value | Object |
{} |
Values of the token. |
| children | Array |
[ |
Children tokens. |
| meta | Object |
{} |
Metadata options. |
Append a new child token and redelegate.
Kind: instance method of Property
| Param | Type | Description |
|---|---|---|
| item | Token |
Token to add. |
Turn the token into a CSS-formatted string.
Kind: instance method of Property
Overrides: render
Returns: String - Token rendered into a string.
Value ⇐ Token
A token to express values.
Kind: global class
Extends: Token
| Param | Type | Default | Description |
|---|---|---|---|
| value | Object |
{} |
Values of the token. |
| meta | Object |
{} |
Metadata options. |
Append a new child token and redelegate.
Kind: instance method of Value
| Param | Type | Description |
|---|---|---|
| item | Token |
Token to add. |
Turn the token into a CSS-formatted string.
Kind: instance method of Value
Overrides: render
Returns: String - Token rendered into a string.
Parse a text or buffer into a token tree.
Kind: global function
Returns: Tree - Token tree of the input.
| Param | Type | Description |
|---|---|---|
| input |
String | Buffer | Array
|
Source to parse. |