README
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