0.2.0 • Published 4 months ago
@spartan-hc/zomelets v0.2.0
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