@neuledge/states
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

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.

Package Sidebar

Install

npm i @neuledge/states

Weekly Downloads

0

Version

0.2.1

License

Apache-2.0

Unpacked Size

254 kB

Total Files

62

Last publish

Collaborators

  • moshe