src/extensible-duck.js
function deriveSelectors(selectors) {
  const composedSelectors = {}
  Object.keys(selectors).forEach(key => {
    const selector = selectors[key]
    if(selector instanceof Selector) {
      composedSelectors[key] = (...args) =>
        (composedSelectors[key] = selector.extractFunction(composedSelectors))(...args)
    }
    else {
      composedSelectors[key] = selector
    }
  })
  return composedSelectors
}
function deriveSelectors(selectors) {
  const composedSelectors = {}
  Object.keys(selectors).forEach(key => {
    const selector = selectors[key]
    if(selector instanceof Selector) {
      composedSelectors[key] = (...args) =>
        (composedSelectors[key] = selector.extractFunction(composedSelectors))(...args)
    }
    else {
      composedSelectors[key] = selector
    }
  })
  return composedSelectors
}
function deriveSelectors ( selectors ) { const composedSelectors = { } Object . keys ( selectors ) . forEach ( key => { const selector = selectors [ key ] if ( selector instanceof Selector ) { composedSelectors [ key ] = ( ... args ) => ( composedSelectors [ key ] = selector . extractFunction ( composedSelectors ) ) ( ... args ) } else { composedSelectors [ key ] = selector } } ) return composedSelectors }
Helper utility to assist in composing the selectors.
Previously defined selectors can be used to derive future selectors.

@param {object} selectors
@returns
Helper utility to assist in composing the selectors . Previously defined selectors can be used to derive future selectors .