Skip to content

unchainedui/compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unchained UI

Compose

NPM Version NPM Downloads

Simple way to build complex components

Usage

import compose from 'uc-compose'
import { log, LOG_LEVEL } from 'uc-log'

const MyClass = function() {}
MyClass.prototype = compose(
  log,
  {
    logLevel: LOG_LEVEL.DEBUG,
    logName: 'My Class',
    method: function() {
      this.log(LOG_LEVEL.INFO, 'Hello')
    }
  }
)

Methods

compose(...args)

This function is just syntax sugar around Object.assign. It always returns new object. To extent existing object pass true as the last argument.

License MIT

© velocityzen

About

Simple way to build complex components

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages