simple-record

0.1.0 • Public • Published

simple-record

Creates record classes that can be instantiated from your simple-interfaces.

What?

You have an interface, want to create a record and a model out of it.

import { createInterface } from 'simple-interface'
// we are gonna use createRecord function to create a record out of this interface.
import { createRecord } from 'simple-record'

const PostInterface = createInterface('PostInterface', {
  title: String,
  body: String
})

const PostRecord = createRecord(PostInterface)

const post = new PostRecord
// post.title === ''
// post.body === ''

install

npm install simple-record

licence

MIT

Package Sidebar

Install

npm i simple-record

Weekly Downloads

3

Version

0.1.0

License

MIT

Last publish

Collaborators

  • usirin