/**
 * include is a function which decorates a target class with the static
 * and instance methods of another class. Usage:
 *
 * @include(IncludableModule, AntherIncludable)
 * class Something {}
 *
*/
function include(...included) {
  return function decorate(target) {
    if (typeof included !== 'undefined' && included.length > 0) {
      included.forEach(to_include => {
        _include(target, to_include)
        _include(target.prototype, to_include.prototype)
      })
    }
  }
}

/**
 * Copies the Proprerty from the source to the target maintaining the
 * given descriptor from the source.
*/
function _include(klass, to_include) {
  Object.getOwnPropertyNames(to_include).forEach(include_property)
  Object.getOwnPropertySymbols(to_include).forEach(include_property)

  function include_property(name) {
    if (should_include(name)) {
      const descriptor = Object.getOwnPropertyDescriptor(to_include, name)
      Object.defineProperty(klass, name, descriptor)
    }
  }

  /**
   * Only the non-existing properties are included. Special properties
   * are also ignored.
  */
  function should_include(name) {
    return (
      !Object.hasOwnProperty(klass, name) &&
        ['prototype', 'name', 'constructor'].indexOf(name) === -1
    )
  }
}

export { include }

@@ -114,95 +114,646 @@
 ass.
- Usage:%0A *%0A * @include(IncludableModule, AntherIncludable)%0A * class Something %7B%7D%0A *%0A*/%0A
+%0A *%0A * %60%60%60js%0A * import %7B include %7D  from 'tays/meta'%0A * import %7B IncludeableModule, AnotherIncludeable %7D from '../mixins'%0A *%0A * @include(IncludableModule, AntherIncludable)%0A * class Something %7B%7D%0A *%0A * // Something now has the static and instance methods of%0A * // IncludableModule and AnotherIncludeable%0A * %60%60%60%0A *%0A * If your environment is not using descorators. The following syntax%0A * may be used as an alternative.%0A *%0A * %60%60%60js%0A * import %7B include %7D  from 'tays/meta'%0A * import %7B IncludeableModule, AnotherIncludeable %7D from '../mixins'%0A *%0A * class Something %7B%7D%0A * include(IncludableModule, AntherIncludable)(Something)%0A * %60%60%60%0A*/%0Aexport 
 func
@@ -1064,13 +1064,14 @@
 Prop
-r
 ert
-y
+ies
  fro
@@ -1083,16 +1083,22 @@
  source 
+class 
 to the t
@@ -1107,59 +1107,51 @@
 get 
-maintaining the%0A * given descriptor from the source
+class.%0A * Both Symbols and Names are copied
 .%0A*/
@@ -1327,16 +1327,119 @@
 perty)%0A%0A
+  /**%0A   * Copies a single property of a name or symbol from the source to%0A   * the target class.%0A  */%0A
   functi
@@ -1916,24 +1916,4 @@
 %7D%0A%7D%0A
-%0Aexport %7B include %7D%0A

Add documentation for include