2.2.2 • Published 6 years ago

pathon v2.2.2

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

OUT OF DATE and NOT MAINTAINED

see https://github.com/artalar/ups

pathon

pathon doing one job - and doing it great - observable data structures. No more architecture or workflow dependence. Just observable state with maximum performance for subscribers (without selectors and etc.).

Example

Basic

Demo

Complex

Demo

React integration

Demo

Instalation

npm install --save pathon

Or

yarn add pathon

API

import { path, immutablePreset } from 'pathon';

const pathRoot = path('root', { count: [1, 1, 1], individualCount: 1 }, immutablePreset);

const pathCount = pathRoot.path('count');

const {
  // Every method is a function:
  get, // get `path` value
  set, // set (and merge) value to `path`
  del, // del value by key
  batch, // accept callback which u can do many set's without call subscriptions (only after `batch`)
  watch, // subscribe to updates
  unwatch, // unsubscribe
  path, // create new `path` - element of current value by specified key
  getPath, // get array of keys from root to current `path`
} =
  pathRoot || pathCount || pathCount.path('0');

If you will update inner property path - all parent path's watchers will be called but other watchers of path's in neighbour branches will not be called

Except immutablePreset you can use any preset for any data-structure. Anyway you can choose not to specify a preset - by default accepted structure will update by mutations.

Look at the examples for detailed reference

TODO

  • Docs
  • Types

TIPS

it's sound like pazone

2.2.2

6 years ago

2.2.1

6 years ago

2.2.0

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0-beta.4

6 years ago

1.0.0-beta.3

6 years ago

1.0.0-beta.2

6 years ago

1.0.0-beta.1

6 years ago

1.0.0

6 years ago