specs/deno/generators library

Functions

convertNodeToSuggestion(Node node) → FigSuggestion
filterNodes(List<Node> nodes, {required bool showPrivateNodes}) → List<Node>
Filter nodes from the input array based on whether they should be shown.
findChildNodes(List<Node> nodes, List<String> path) → List<Node>
Get the child nodes of a given lookup path. If multiple nodes have the same name, all their children will be returned.
generatePreferredFilepaths({required List<String> names, int matchPriority = 75}) → FigGenerator
Equivalent to the "filepaths" template, but boosts the priority of files that match one of the names provided.
getConfigPath(List<String> tokens) → String?
getDenoConfig(List<String> tokens, ExecuteCommandFunction executeShellCommand) → Future<DenoConfigurationFile?>
getNodeChildren(Node node) → List<Node>
Get the children of the given node, if it has children. If it cannot have children, return an empty array.
getNodeTypeName(Node node) → String
Get a human-readable short name for the kind of node
getPriorityByNodeName(String name) → int
Get the priority of a node based on its name. Values starting with upper- case letters should be prioritized, values starting with underscores should be below everything else.
getUniqueNamed<T extends dynamic>(List<T> input) → List<T>
Get unique values
stripJsonComments(String json) → String
valueList({required List<FigSuggestion> values}) → FigGenerator

Typedefs

Node = dynamic