@flex-development/docmark-factory-identifier
v1.0.0-alpha.14
Published
docmark factory to parse identifiers
Maintainers
Readme
docmark-factory-identifier
docmark factory to parse identifiers.
Contents
What is this?
This package exposes states to parse identifiers.
When should I use this?
This package may be useful when making your own docmark extensions.
Install
This package is ESM only.
In Node.js with yarn:
yarn add @flex-development/docmark-factory-identifierIn Deno with esm.sh:
import { factoryIdentifier } from 'https://esm.sh/@flex-development/docmark-factory-identifier'In browsers with esm.sh:
<script type="module">
import { factoryIdentifier } from 'https://esm.sh/@flex-development/docmark-factory-identifier'
</script>Use
TODO: use
API
This package exports the identifier factoryIdentifier.
There is no default export.
factoryIdentifier(effects, ok, nok[, type])
Tokenize an identifier.
Parameters
effects(Effects) — the context object used to transition the state machineok(State) — the successful tokenization statenok(State) — the failed tokenization statetype(TokenType|null|undefined, optional) — the token type to capture the identifier as.- default:
tt.identifier
- default:
Returns
(State) The initial state
Types
This package is fully typed with TypeScript.
It exports no additional types.
Project
Version
docmark-factory-identifier adheres to semver.
Contribute
See CONTRIBUTING.md.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
Sponsor
Small primitives power larger systems. Support long-term stability by sponsoring Flex Development.
