@n7e/data-memory

0.1.1 • Public • Published

Data Memory

In-memory implementations of the @n7e/model data mapper and repository strategy.

Both the data mapper and repository strategy share the same data model, so they can share entities:

import { MemoryDataMapper } from "@n7e/data-memory/data-mappers";
import { MemoryStrategy } from "@n7e/data-memory/repositories";

const entities = new Map();
const dataMapper = new MemoryDataMapper(entities);
const strategy = new MemoryStrategy(entities);

// Any entities created by the data mapper will be retrievable by the repository
// strategy.

Readme

Keywords

Package Sidebar

Install

npm i @n7e/data-memory

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

9.07 kB

Total Files

14

Last publish

Collaborators

  • martin-n7e