[Home](./index.md) > [@csstools/css-parser-algorithms](./css-parser-algorithms.md) > [FunctionNode](./css-parser-algorithms.functionnode.md) ## FunctionNode class A function node. **Signature:** ```typescript export declare class FunctionNode extends ContainerNodeBaseClass ``` **Extends:** [ContainerNodeBaseClass](./css-parser-algorithms.containernodebaseclass.md) ## Example ```js const node = parseComponentValue(tokenize('calc(1 + 1)')); isFunctionNode(node); // true node.getName(); // 'calc' ``` ## Constructors
Constructor Modifiers Description
[(constructor)(name, endToken, value)](./css-parser-algorithms.functionnode._constructor_.md) Constructs a new instance of the `FunctionNode` class
## Properties
Property Modifiers Type Description
[endToken](./css-parser-algorithms.functionnode.endtoken.md) CSSToken The token for the closing parenthesis of the function. If the function is unclosed, this will be an EOF token.
[name](./css-parser-algorithms.functionnode.name.md) TokenFunction The token for the name of the function.
[type](./css-parser-algorithms.functionnode.type.md) [ComponentValueType](./css-parser-algorithms.componentvaluetype.md) The node type, always `ComponentValueType.Function`
## Methods
Method Modifiers Description
[getName()](./css-parser-algorithms.functionnode.getname.md) Retrieve the name of the current function. This is the parsed and unescaped name of the function.
[normalize()](./css-parser-algorithms.functionnode.normalize.md) Normalize the current function: 1. if the "endToken" is EOF, replace with a ")-token"
[tokens()](./css-parser-algorithms.functionnode.tokens.md) Retrieve the tokens for the current function. This is the inverse of parsing from a list of tokens.
[toString()](./css-parser-algorithms.functionnode.tostring.md) Convert the current function to a string. This is not a true serialization. It is purely a concatenation of the string representation of the tokens.