Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@neuledge/states

neuledge19Apache-2.00.2.1TypeScript support: included

Neuledge Engine internal state management and context

neuledge, engine, state, parser, context

readme

Neuledge States

An internal context and state management library for Neuledge Engine.

This library is not intended to be used directly. It is a dependency of the main package.

📦 Installation

npm install @neuledge/states

🚀 Getting started

import { StatesContext } from '@neuledge/states';
import { promises as fs } from 'fs';

const ctx = new StatesContext();

// load a state file
await ctx.load([{
  source: await fs.readFile('posts.states', { encoding: 'utf8' }),
  filePath: 'posts.states',
}]);

for (const state of ctx.states) {
  // do something with the state
}

📄 License

Neuledge is Apache 2.0 licensed.