gram_preset_basic
Globals / gram-preset-basic
Package: gram-preset-basic
gram-preset-basic
TODO: description
How to gram-preset-basic
Prepare a unified text processing engine:
const unified = require('unified');
const gramParserPlugin = require('@gram-data/gram-parse').gramParserPlugin;
const gramPresetBasic = require('@gram-data/gram-preset-basic');
const gramProcessor = unified()
.use(gramParserPlugin)
.use(gramPresetBasic);
Just parse:
const parsed = gramProcessor.parse(src);
Parse and apply plugins by calling runSync() on the processor:
const parsed = gramProcessor.runSync(gramProcessor.parse(src));
Index
Variables
Variables
plugins
• Const
plugins: (Attacher<IdentityPluginSettings[], Settings> | Attacher<ValuePluginSettings[], Settings>)[] = [gramIdentityPlugin, gramValuePlugin]
Defined in packages/gram-preset-basic/src/index.ts:9