import { NodeDefinition, NodeLike, StatelessGraphNode, StatelessNodeDefinition, StatelessNodeType } from '../../types/graph'; /** * An instance of the [[split]] node. * See the [[split]] documentation to find out more. */ export interface SplitNode extends StatelessGraphNode<'split', SplitNodeProperties> { } /** * A definition of the [[split]] node. * See the [[split]] documentation to find out more. */ export interface SplitNodeDefinition extends StatelessNodeDefinition<'split', SplitNodeProperties> { } export interface SplitNodeProperties { limit: NodeDefinition | undefined; separator: NodeDefinition; subject: NodeDefinition; } /** * The implementation of the [[split]] node. * See the [[split]] documentation to learn more. */ export declare const SplitNodeType: StatelessNodeType<'split', SplitNodeProperties>; /** * Creates a new instance of a [[split]] node, which is used for splitting a string by a given separator. The node expects the * subject and separator to be a [[value]] containing a string value. The [[split]] can * optionally define a limit - a [[value]] containing a numeric value. It works in a similar * way to the `String.split`. * * * @example **Split a string** * ```js * import muster, { split } from '@dws/muster'; * * const app = muster({}); * * await app.resolve(split( * 'The quick brown fox jumps over the lazy dog', * ' ', * )); * // === [ * // 'The', * // 'quick', * // 'brown', * // 'fox', * // 'jumps', * // 'over', * // 'the', * // 'lazy', * // 'dog', * // ]; * ``` */ export declare function split(subject: NodeLike, separator: NodeLike, limit?: NodeLike): SplitNodeDefinition; export declare function isSplitNodeDefinition(value: NodeDefinition): value is SplitNodeDefinition;