@sewjs/core

0.0.3 • Public • Published

SewJs

Installation

npm install @sewjs/core

Usage

NPM

const SewJs = require('@sewjs/core');

- or -

In Browser

<script src="https://unpkg.com/@sewjs/core"></script>

API reference

Initializing

var sewjs = new SewJs();

Getter

sewjs.variable

Setter

sewjs.variable = value

Link

var dummyObject = {};
sewjs.link('variable',
dummyObject, /* parent object */
'newVariable', /* variable in parent object */
/* transform value function returning the new value (optional) */);

- or -

var dummyObject = {};
sewjs.link('variable',
 /* callback */
function(value) {
    this.classList.add(value)
},
document.querySelector('body'), /* destination  (optional) */
/* transform value function returning the new value (optional) */);

Unlink

var dummyObject = {};
sewjs.unlink('variable',
dummyObject, /* parent object (optional) */
'newVariable' /* variable in parent object (optional) */);

- or -

var dummyObject = {};
sewjs.unlink('variable',
 /* callback (optional) */
function(value) {
    this.classList.add(value)
},
document.querySelector('body') /* destination (optional) */);

/@sewjs/core/

    Package Sidebar

    Install

    npm i @sewjs/core

    Weekly Downloads

    4

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    6.66 kB

    Total Files

    5

    Last publish

    Collaborators

    • dominicvonk