1.0.0 • Published 3 years ago

hybrids-compose v1.0.0

Weekly downloads
2
License
UNLICENSED
Repository
github
Last release
3 years ago

hybrids-compose

compose hybrids.js component property descriptors

Example

import { compose, composeWithValue } from "hybrids-compose";

const Component = {
  prop: compose(
    descriptorFactoryOne(),
    descriptorFactoryTwo(),
    descriptorFactoryN()
  ),
};

// or
// someValue = undefined || null || boolean || number || string

const Component = {
  prop: composeWithValue(
    someValue,
    descriptorFactoryOne(),
    descriptorFactoryTwo(),
    descriptorFactoryN()
  ),
};

Rules

  • definitions compose right to left
  • get handlers compose by passing previous handler result into lastValue
  • set handlers compose by passing previous handler result into value
  • connect handlers compose by calling them in order, and their disconnects callbacks in reverse order
  • observe handlers compose by calling them in order
  • supports descriptor translations
1.0.0

3 years ago

0.1.1

4 years ago

0.1.0

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago