Expand description
AST-based config file parser utilities.
Helpers for statically extracting config values from JS/TS files.
Functions§
- config_
default_ export_ unreachable - True when a parsed config has neither an object nor array default export.
- extract_
config_ aliases - Extract alias mappings from an object or array-based alias config.
- extract_
config_ aliases_ kinded - Like
extract_config_aliasesbut each tuple carries a bare-string flag. - extract_
config_ array_ nested_ aliases - Extract alias mappings nested inside an array of config objects.
- extract_
config_ array_ nested_ aliases_ kinded - Kinded variant of
extract_config_array_nested_aliases. - extract_
config_ array_ nested_ string_ or_ array - Extract string values from a property path, also searching inside array elements.
- extract_
config_ array_ object_ string_ pairs - Extract paired
(primary, optional secondary)string values from each object element of an array atarray_path. - extract_
config_ array_ object_ strings - Extract string values from a nested array, supporting both string elements and object elements with a named string/path field.
- extract_
config_ nested_ shallow_ strings - Extract shallow strings from an array property inside a nested object path.
- extract_
config_ object_ keys - Extract keys of an object property at a nested path.
- extract_
config_ object_ nested_ string_ or_ array - Extract string values from a property path, searching inside all values of an object.
- extract_
config_ object_ nested_ strings - Extract a single string value from each object under a property path.
- extract_
config_ path - Extract a statically recoverable path-like value from a property path.
- extract_
config_ path_ aliases - Extract alias mappings where the replacement is a filesystem path value.
- extract_
config_ plugin_ option_ string - Extract a string-like option from a plugin tuple inside a config plugin array.
- extract_
config_ plugin_ option_ string_ from_ paths - Extract a string-like option from the first plugin array path that contains it.
- extract_
config_ property_ strings - Extract string values from top-level properties of the default export or
module.exportsobject. - extract_
config_ require_ strings - Extract
require('...')call argument strings from a property’s value. - extract_
config_ shallow_ strings - Extract only top-level string values from a property’s array.
- extract_
config_ shallow_ strings_ or_ object_ property - Extract top-level string values from a config array, including object entries.
- extract_
config_ static_ dir_ entries - Extract Storybook-style static directory entries from an array.
- extract_
config_ string - Extract a single string from a property at a nested path.
- extract_
config_ string_ array - Extract string array from a property at a nested path in a config’s default export.
- extract_
config_ string_ or_ array - Extract a value that may be a single string, string array, or object with string/array values.
- extract_
config_ truthy_ bool_ or_ object - True when a nested config property is a static
trueboolean or object value. - extract_
default_ export_ array_ aliases_ kinded - Extract kinded aliases from a default-exported ARRAY config.
- extract_
imports - Extract all import source specifiers from JS/TS source code.
- extract_
imports_ and_ requires - Extract import sources and top-level
require('...')statements. - extract_
lazy_ imports_ in_ array - Extract static specifiers from thunk-wrapped dynamic imports inside an array property.
- extract_
vite_ react_ babel_ dependencies - Extract Babel plugin and preset package names configured through
@vitejs/plugin-reactoptions in a Vite-stylepluginsarray. - find_
config_ object_ pub - Public wrapper for
find_config_object. - normalize_
config_ path - Normalize a config-relative path to a project-root-relative forward-slash string.
- normalize_
config_ path_ buf - Normalize a config-relative path to a project-root-relative path.