Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Check The Instance and Child

node v6.17.1
version: 1.0.0
endpointsharetweet
const jkt = require('jkt') const Person = jkt` name: String age: Number hobby: Array ` const Child = Person` toys: Array doingHomework: Boolean ` const Mother = Person` singleParent: Boolean ` const John = Child({ name: "John Doe" }) Child.childOf(Person) // true Mother.childOf(Person) // true John.instanceOf(Person) // true John.instanceOf(Child) // true
Loading…

no comments

    sign in to comment