@sivrad/matrix
TypeScript icon, indicating that this package has built-in type declarations

1.0.39 • Public • Published

Matrix Logo

Matrix
An opinionated schema-based database interface for the modern world.

[ Installation 💾 | Usage 🤓 | NPM 📦 | Github 🕸 ]

Installation

yarn add @sivrad/matrix

Usage

Create Matrix Instance

// Import Matrix from this package.
import { Matrix } from '@sivrad/matrix';

// Create an instance and pass all the collections.
const mtx = new Matrix([exampleCollection]);

Get Collection

console.log(mtx.getCollection('example'));

Get a Type

console.log(mtx.getType('example.ExampleThing'));

The rest of this is meant to be used by generated code with the collection-tools package.

Contributing

These are the steps to contribute to the Matrix Package.

Post Git Clone

Install Dependencies

Install node dependencies with yarn.

yarn

Generate Internal Types

This generates internal types from the JSON schemas from this repo.

yarn generate-types

Building the Package

This script will build the package and transpile the code to Javascript.

yarn build

Additionally, you can just build the src/types/* files with:

yarn build-types

This is usefull if you don't want to transpile into Javascript every time you change something.

Readme

Keywords

none

Package Sidebar

Install

npm i @sivrad/matrix

Weekly Downloads

1

Version

1.0.39

License

MIT

Unpacked Size

140 kB

Total Files

107

Last publish

Collaborators

  • k2on