0.2.0 • Published 4 months ago

@spartan-hc/zomelets v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

npm.io

Zomelets

Tools for defining configuration according to the Zomelet Specification.

npm.io npm.io npm.io

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