dev()

Enables development tool. Currently, the development tool prints the tree in console log whenever set is called.

Parameters

  • N/A

Returns

  • N/A

Examples

import Treeful from 'treeful';

Treeful.dev();

Treeful.add('n1')
       .add('n2', 'string')
           .add('n3', true, 'n2');

Treeful.set('n1', 1);
/*
root: null
    n2: string
        n3: true
    n1: 1
*/

Treeful.toggle('n3');
/*
root: null
    n2: string
        n3: false
    n1: 1
*/

results matching ""

    No results matching ""