1.0.2 • Published 6 years ago

neo-riven v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

NēoRiven

A Node friendly re-implementation of Riven.

Installation

Install it by running

$ yarn add neo-riven
# or
$ npm i -s neo-riven

Usage.

The selector must be bound to the Riven instance.

import Riven from 'neo-riven'
const rvn = new Riven()

const { Ø } = rvn.bind() // Now the selector is bound to the Riven instance.

Nodes are defined as classes:

class ConsoleNode extends Riven.Node {
	constructor(ctx, id, rect) {
		super(ctx, id, rect)
		this.glyph = Riven.NODE_GLYPHS.render
	}

	receive(q) {
		console.log(q)
	}
}