Skip to content

rubixibuc/hybrids-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published