{"name":"indefinite-observable","version":"1.0.2","scripts":{"start":"node ./devServer.js","clean":"rm -rf ./dist/*; mkdir -p ./dist/","lint":"tslint -c tslint.json --project tsconfig.json","pretest":"yarn run lint; yarn run build; tsc --project ./tsconfig.tests.json","test":"nyc mocha ./dist/**/__tests__/**.js","posttest":"nyc report --reporter=json && codecov -f coverage/*.json","build":"yarn run clean; tsc; node ./build.js","prepublish":"yarn run build"},"main":"dist/index.js","types":"dist/index.d.ts","typescript:main":"src/index.ts","dependencies":{"symbol-observable":"1.2.0"},"devDependencies":{"chai":"3.5.0","codecov":"^1.0.1","mocha":"3.2.0","mocha-junit-reporter":"^1.18.0","mocha-sugar-free":"1.3.1","nyc":"^10.0.0","pre-commit":"1.1.3","pundle-dev":"1.1.11","sinon":"2.0.0-pre.3","sinon-chai":"2.8.0","tsickle":"0.2.0","tslint":"4.0.2","tslint-junit-formatter":"^5.1.0","typescript":"2.1.4","typescript-pundle":"1.0.1"},"pre-commit":["build"],"repository":{"type":"git","url":"git+ssh://git@github.com/material-motion/indefinite-observable-js.git"},"author":{"name":"The Indefinite Observable Authors","url":"see AUTHORS"},"license":"Apache-2.0","bugs":{"url":"https://github.com/material-motion/indefinite-observable-js/issues/"},"homepage":"https://github.com/material-motion/indefinite-observable-js/#readme","contributors":[{"name":"Google Inc."},{"name":"and other contributors"}],"gitHead":"49af2db72d064800225e355e0eb59add0a889cf7","description":"<!-- TODO: update version number before releasing --> ![Current version:](https://img.shields.io/badge/v1.0.2:-222222.svg?logo=npm) [![Test status](https://img.shields.io/circleci/project/github/material-motion/indefinite-observable-js/stable.svg?logo=cir","_id":"indefinite-observable@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"8.11.4","_npmUser":{"name":"appsforartists","email":"npm@appsforartists.com"},"dist":{"integrity":"sha512-Mps0898zEduHyPhb7UCgNmfzlqNZknVmaFz5qzr0mm04YQ5FGLhAyK/dJ+NaRxGyR6juQXIxh5Ev0xx+qq0nYA==","shasum":"0a328793ab2385d4b9dca23eaab4afe6936a73f8","tarball":"http://registry-npm.ywwl.com/indefinite-observable/download/indefinite-observable-1.0.2.tgz","fileCount":40,"unpackedSize":189653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb/eYBCRA9TVsSAnZWagAAG0YP/2OSUR742LLmzbCeLR1O\n5nZM/nJFSYwV6rAiH9GSERpt5vfUQDqQC/ApsEkcZagdlNI4FRIVKzS9k45c\nDLC9D9PYHziWg/gzLU6cDlfScU8zbgISU55OdJUkbmMgIR0UbUONf5T95r2c\nIsEq+j4sVlhKNUEhg8K5IlTTCxhkX8GdvJAoh0yu6M+F6hfgcTW0tx11zMpi\no44DFIQ9NLubkPEmZztnFMis7d4hqveA6XOL0XZNRfl56y+ZPF68UrY3jMrH\nNM19YcZavMxYhY2+sCs95IJe5lcekWvY3/zrgmNnSPV2K/PcbCU/2xupEAlj\nIhnf02Cwp6cfpTmAw0dlb5d21+n3J1Ucmaytw1cXMJ65YT2PpNi93cBESSoN\nFoalTgx/JtVZhCCHvdn+zWQihGvBatuarol9b8IiYxCGSEVhswZMg6PFaObP\nMqfndY/FBQ3SySA6bnFl1PuMS1vjzbn7zWspN1wGhF2Ab1ZCGyfsYUmeH1ym\n+A6jPSvpeNMdWwKLEqpZw+ZmF6eDIQ5oG2Rae2KjU/SGlWWnXVoa0dwd84ex\n/CoqoXpmzSEUc3oDUlv8JimE/SzvozmVCb6OKo2LVT5z3WEJuhxYmL8Uvgf9\n5aNEdod/kD81h9R1Flsk99H+UifOfa7egPlKhTRzTRZDIwKCC3jPevKzb81j\nzv8f\r\n=c2mA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCX9CGSp42Sba1gCtgBavwcDswymCMmaq6obWPvL0fB3AIhANA9Q+lLsasy1g/ubMI7JGv4SRQRfMvHJR7KzVPya+xz"}],"size":61936,"noattachment":false,"key":"/indefinite-observable/-/indefinite-observable-1.0.2.tgz"},"maintainers":[{"name":"appsforartists","email":"git@appsforartists.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/indefinite-observable_1.0.2_1543366145030_0.4825486968719366"},"_hasShrinkwrap":false,"readme":"# Indefinite Observable #\n\n<!-- TODO: update version number before releasing, here and in the script tag -->\n[![Current version:](https://img.shields.io/badge/v2.0.1:-222222.svg?logo=npm)](https://www.npmjs.com/package/indefinite-observable/v/2.0.1)\n[![Test status](https://img.shields.io/circleci/project/github/material-motion/indefinite-observable-js/stable.svg?logo=circleci&label=Tests)](https://circleci.com/gh/material-motion/indefinite-observable-js/48)\n[![Code coverage](https://img.shields.io/codecov/c/github/material-motion/indefinite-observable-js/stable.svg?logo=codecov&logoColor=white&label=Coverage)](https://codecov.io/gh/material-motion/indefinite-observable-js/tree/f601df73be779477218f1fcf709b18e6b621de20/src)<br />\n[![HEAD:](https://img.shields.io/badge/HEAD:-222222.svg?logo=github&logoColor=white)](https://github.com/material-motion/indefinite-observable-js)\n[![Test status](https://img.shields.io/circleci/project/github/material-motion/indefinite-observable-js/develop.svg?logo=circleci&label=Tests)](https://circleci.com/gh/material-motion/indefinite-observable-js/tree/develop)\n[![Code coverage](https://img.shields.io/codecov/c/github/material-motion/indefinite-observable-js/develop.svg?logo=codecov&logoColor=white&label=Coverage)](https://codecov.io/gh/material-motion/indefinite-observable-js/branch/develop)\n\n## Why? ##\n\nThere are a lot of great Observable implementations, but they're baked into featureful libraries which contribute to both complexity and filesize.  We wanted the simplest-possible Observable implementation, with no operators, no fancy scheduling.  The entire thing is basically [three statements in `subscribe`](https://github.com/material-motion/indefinite-observable-js/blob/develop/src/IndefiniteObservable.ts#L68-L72).\n\nIndefinite Observable is a subset of the [TC39 Observable proposal](https://tc39.github.io/proposal-observable/) that never `complete`s or `error`s.  It implements the [minimal-necessary functionality](https://en.wikipedia.org/wiki/You_aren't_gonna_need_it), but it should be completely interchangeable with the TC39 proposal for the subset that it does implement.\n\nIf you want a complete Observables library that works out-of-the-box, check out [xstream](https://github.com/staltz/xstream/), [RxJS](https://github.com/ReactiveX/RxJS/), [Most](https://github.com/cujojs/most/), [Bacon](https://github.com/baconjs/bacon.js/), or [Kefir](https://github.com/rpominov/kefir/).  If you want to build your own Observables library that includes just the functionality you need, try [Indefinite Observable](https://github.com/material-motion/indefinite-observable-js/#indefinite-observable).\n\n## Usage ##\n\n```javascript\nimport { IndefiniteObservable } from 'indefinite-observable';\n\nconst moveEvent$ = new IndefiniteObservable(\n  (observer) => {\n    // Whenever you want the observable to dispatch a value, call\n    // observer.next(value).\n    element.addEventListener('pointermove', observer.next);\n\n    // Return a function that will perform any necessary clean up when the\n    // observable is unsubscribed from.\n    return () => {\n      element.removeEventListener('pointermove', observer.next);\n    }\n  }\n);\n\n// To receive the values dispatched by an observable, pass an observer to its\n// subscribe method.  An observer is just an object with a next method.\n//\n// subscribe returns a unsubscribe function.  Call that when you no longer want\n// to receive dispatches from the observable.\nconst unsubscribe = moveEvent$.subscribe({\n  next(moveEvent) {\n    console.log('got a pointer event: ', moveEvent);\n  }\n});\n```\n\nLearn more about [How Indefinite Observables work](https://material-motion.github.io/material-motion/documentation/IndefiniteObservable).\n\n## Installation ##\n\n```\nyarn add indefinite-observable\n```\n\nor include as a script tag:\n\n```html\n<script type = \"module\">\n  import { IndefiniteObservable } from \"https://ajax.googleapis.com/ajax/libs/indefinite-observable/2.0.1/indefinite-observable.bundle.js\"\n</script>\n```\n\n## Contributing ##\n\nThis library aims to be as simple as possible, so modifications will be rare.  Reasons we might make changes are limited to:\n\n- bugs, or\n- remaining compatible with the subset of the Observable spec that we support.\n\nIf you'd like to add operators, static methods, or other features, we invite you to depend upon us subclassing `IndefiniteObservable` in your own module.  In fact, [that's how we add features too](https://github.com/material-motion/material-motion-js/blob/develop/packages/core/src/observables/MotionObservable.ts).\n\nOf course, we welcome improvements to the examples and documentation in this repo.\n\n### Bundling ###\n\nOur source is available in 3 flavors: a TypeScript module, a JavaScript module, and a JavaScript bundle.  Any changes made to the first need to be reflected in the other two.  This should be handled for you automatically via a pre-commit hook.  If you have a clean working copy after committing, you're good.  If not, amend the commit with the new build before pushing.\n\nIf you need to bundle it independently, run\n\n```\nyarn run build\n```\n\n### Testing ###\n\n```\nyarn run test\n```\n\n## License ##\n\n[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n","publish_time":1543366145201,"_cnpm_publish_time":1543366145201,"dist-tags":{"latest":"2.0.1"}}