join-layer.js 303 B

123456789
  1. "use strict"
  2. module.exports = function (parentLayer, childLayer) {
  3. if (!parentLayer.length && childLayer.length) return childLayer
  4. if (parentLayer.length && !childLayer.length) return parentLayer
  5. if (!parentLayer.length && !childLayer.length) return []
  6. return parentLayer.concat(childLayer)
  7. }