Skip to content

morulus/propsflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

propsflow

Create sequence of plain object's enhancers, powered with extraflow.

Modifications:

  • Auto spread objects;
  • Type restricted.
const enhancer = propsflow(
  () => ({ A, B, C }) => ({
    D: A + B + C,
  }),
  ({ A }) => ({
    B: A * 2,
  }),
  ({ B }) => ({
    C: B * 2
  }),
)

enhancer({
  A: 2
});
/*
{
  A: 2,
  B: 4,
  C: 8,
  D: 14
}
*/

License

MIT, 2018, Vladimir Morulus vladimirmorulus@gmail.com

About

Object enhancers flow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published