skema.duplex

1.1.1 • Public • Published

Build Status Coverage

skema.duplex

Duplex skema

Install

$ npm i skema.duplex

Usage

import duplex from 'skema.duplex'
 
const Member = duplex('Member', {
  id: [Number, String],
  name: String
})
 
Member.keys   // ['id', 'name']
 
Member.from({
  id: '123',
  name: 'kael'
})
// - id: 123
// - name: 'kael'
 
Member.fromR({
  id: 123,
  name: 'kael'
})
// -id: '123'
// -name: 'kael'

License

MIT

Package Sidebar

Install

npm i skema.duplex

Weekly Downloads

6

Version

1.1.1

License

MIT

Unpacked Size

9.93 kB

Total Files

7

Last publish

Collaborators

  • kael