How to use symbol-observable - 2 common examples

To help you get started, we’ve selected a few symbol-observable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kefirjs / kefir / src / interop / symbol.js View on Github external
// this file contains some hot JS modules systems stuff

import symbol from 'symbol-observable'
export default symbol.default ? symbol.default : symbol
github caiogondim / with-subscribe.js / index.js View on Github external
function implementObservableInterface (target) {
  Object.defineProperty(target, $$observable, {
    enumerable: false,
    value: function () {
      return ({
        subscribe: target.subscribe,

        [$$observable] () {
          return this
        }
      })
    }
  })

  return target
}

symbol-observable

Symbol.observable ponyfill

MIT
Latest version published 3 years ago

Package Health Score

71 / 100
Full package analysis

Popular symbol-observable functions