@spartan-hc/zomelets
v0.2.0
Published
Tools for implementing the Zomelet specification in Javascript
Downloads
45
Readme
Zomelets
Tools for defining configuration according to the Zomelet Specification.
Overview
The official Javascript implementation of the Zomelets Specification.
Install
npm i @spartan-hc/zomelets
Simplest Usage
import { EntryHash } from '@spartan-hc/holo-hash';
import { Zomelet } from '@spartan-hc/zomelets';
export const ThingZomelet = new Zomelet({
async create_thing ( thing ) {
return new EntryHash( await this.call( thing ) );
},
// Virtual functions
async create_things ( things = [] ) {
return await Promise.all( things.map( thing => this.functions.create_thing(thing) ) );
},
});
Contributing
See CONTRIBUTING.md