Nutmeg Plundering Muse

    @actualwave/walker-denormalize-adapter

    0.0.3 • Public • Published

    Denormalize Adapter for TreeWalker

    TreeWalker Adapter for normalized trees:

    import { create } from '@actualwave/tree-walker';
    import { createAdapter } from '@actualwave/walker-denormalize-adapter';
    
    const store = {
      entities: {
        nodes: {
          parent: {
            value: 'parent value',
            children: ['child'],
          }
          child: {
            value: 'child value',
          }
        },
      },
    };
    
    const root = create('parent', createAdapter(() => store.entities.nodes));
    console.log(root.child.valueOf()); // { value: 'child value' }

    Demo

    You can check demo on jsfiddle.net.

    Install

    npm i @actualwave/walker-denormalize-adapter

    DownloadsWeekly Downloads

    3

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    12.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • actualwave