{"_id":"observable-fns","_rev":"6-6127ff16a360a3caf60bfb3a8e7652b1","name":"observable-fns","dist-tags":{"latest":"0.6.1","testing":"0.5.1-test"},"versions":{"0.4.0":{"name":"observable-fns","version":"0.4.0","description":"Light-weight observable implementation and utils written in TypeScript. Based on zen-observable.","author":{"name":"Andy Wermke","url":"https://github.com/andywer"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/andywer/observable-fns.git"},"module":"./dist.esm/index.js","sideEffects":["**/_symbols.js"],"scripts":{"prebuild":"rimraf dist/ dist.esm/","build":"run-s build:cjs build:esm","build:cjs":"tsc","build:esm":"tsc -p ./tsconfig.esm.json","create-entrypoints":"rimraf *.js *.d.ts && node ./scripts/create-entrypoints.js","test":"ava","posttest":"tslint --project .","prepare":"run-s build create-entrypoints"},"devDependencies":{"ava":"^2.4.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","ts-node":"^8.5.4","tslint":"^5.18.0","tslint-config-prettier":"^1.18.0","typescript":"^3.5.3"},"ava":{"compileEnhancements":false,"extensions":["ts"],"files":["test/**/*.test.ts"],"require":["ts-node/register"]},"gitHead":"de810f50c3595dab74397e7f5958d3812b0c8b27","bugs":{"url":"https://github.com/andywer/observable-fns/issues"},"homepage":"https://github.com/andywer/observable-fns#readme","_id":"observable-fns@0.4.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-2BFtEqza7sjLpgImAmagHK97mBwh3+bkwAZS/qF/4n2S8RzKsbdsdOczRBh+Piz7QgQZRAjTzI5vtxtOUgU+cQ==","shasum":"c77a7b8bd795515a9bd75f58d266d3aa421aafc6","tarball":"https://registry.npmjs.org/observable-fns/-/observable-fns-0.4.0.tgz","fileCount":81,"unpackedSize":96613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7T9HCRA9TVsSAnZWagAA1h0P/Aj0+0NQVHzTWP6rvkfZ\nDinjzEkWsRyIzr2JbbJ/siApoHYG8TdmWEZPjQUB9WtbMM9F7HlVr2ZAFMYW\nR2yVkWMFKsU7ivCvpfUyjM/Khx3XR+rmmuerXZAnKRODr3orkuveRb9y9clW\nRXprhqAuLV+Iy6zPLp+W88DAeAnlCg5GciG2RG7jT8BeQKBBAckuHciB8xar\nOECR7f3Iw4tzz259JWSw0jhBaWHhve2H4lVqlFGMSlwz8B+s+Tfhxzvu9nWj\nZhLq6TTjxUuNR3lN8jjLe+9NDrCisYs2bT6V9Ua5kGqAuXqcgtnW56Ip3YHp\ntIPmIumzAZQ7ZK0tS3cIYSihJ50H2j6vyV+NNpgEXpBJCmiTeiNQdpDCv3hE\nOSsv+fub5sqzfqXDmnEUe9VecD/Q72M34lL6ORa3ljb1wPkFUMI1xyaVpwQf\nv4chQl1pse9jijljke+HWS7v3ztkNK0RN6JhaNwMkyJpDhyPx97NN+FZnzH3\nRSAidal+gC0QS0R+hRy2GvboibzqSI24cVq7Q9MY4sl/1nG9aXe4yaWJkdns\nJT0uTolZUy1s4QphDbrVBnSSAQ0xEL8jylXGWr2SKQywU+Vbrl6pCh9nLjZr\ny9UQJdnqXRcrR/xnX/uUILtqDaRVOQBO+m5mCSNr60RueqqexGt9jIAqJ/WW\nIHW9\r\n=7hSj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID479ByBb2H4LxJTV8FVgfhPYoKcghYgWqiZyuHa0FphAiB60u909hUSbOA6HdC/UC/5JJAd7YwHQkaYGZWwu4jNBw=="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/observable-fns_0.4.0_1575829319033_0.9561010715304192"},"_hasShrinkwrap":false},"0.5.0":{"name":"observable-fns","version":"0.5.0","description":"Light-weight observable implementation and utils written in TypeScript. Based on zen-observable.","author":{"name":"Andy Wermke","url":"https://github.com/andywer"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/andywer/observable-fns.git"},"module":"./dist.esm/index.js","sideEffects":["**/_symbols.js"],"scripts":{"prebuild":"rimraf dist/ dist.esm/","build":"run-s build:cjs build:esm","build:cjs":"tsc","build:esm":"tsc -p ./tsconfig.esm.json","create-entrypoints":"rimraf *.js *.d.ts && node ./scripts/create-entrypoints.js","test":"ava","posttest":"tslint --project .","prepare":"run-s build create-entrypoints"},"devDependencies":{"ava":"^2.4.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","ts-node":"^8.5.4","tslint":"^5.18.0","tslint-config-prettier":"^1.18.0","typescript":"^3.5.3"},"ava":{"compileEnhancements":false,"extensions":["ts"],"files":["test/**/*.test.ts"],"require":["ts-node/register"]},"gitHead":"ec0d291c1eb0e37bb001dc6b097b3f472f95f96c","bugs":{"url":"https://github.com/andywer/observable-fns/issues"},"homepage":"https://github.com/andywer/observable-fns#readme","_id":"observable-fns@0.5.0","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-BWmxvFppAKRWWTYns+yW3RaoXLTkSVF1cnLNe06opO4/C4VVfZgRkwSEBLOAA6bcTNM1zDDRz2T+l52cPNuaZQ==","shasum":"9b71bb3e1a6ac9840b3922b67de0092773230177","tarball":"https://registry.npmjs.org/observable-fns/-/observable-fns-0.5.0.tgz","fileCount":81,"unpackedSize":97025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd9bhWCRA9TVsSAnZWagAAE/gP/RMQJOQwd0lH58sQg29b\ngkFwCdiCblxq+a62KuwOK6uAsFEnBqkZ6KHslF/negG1L7oPaoPz8DuuA/5+\nNQYnPVNMjhWnJr/6WEzxB+p4QljWBdRJ10/2gDN5KWxVa0DbvAcHyUYTsvvI\nTNRGQT6dOll2ugrsoyBMb/OeUWnmRkq6k0GDNC25zP83++jpLQWOVF2cX9tT\nUCPoeJLBn84fRL5l2mINTmFfvZZi++E3qCJAWYmyB5C5mmE4AtT92s1tU6Fk\nyvSo+80155fKwrrJl7HuBV1C5gCQr9VfpmU2BI9Jq0sPlu9jZuhs9VerA8m/\ntUETnRyQZowDepX18YZWNg3Cru3O0PG4QYbLOcp8MJ7gq/UynCBfe962d7ak\ns/Z03lD8MGwxtLXbMslOVlJCrIIyPVvYiG7Tx7AS16e/rTBm2VzvoDqiT+j9\nDPHUTfW75cYD07d5df8TOIJk6v2odZbHHe7jsUwwlgyyZzdHHwo53hbVQDZz\nDnkjpaaamPWGXcFoI8ccyR8+TUewO0GnZ28HSw2HT6FX8qRwubVsnZ57gtHC\n9IMfHr3O0vullT6zCrkp2kZk0sp6bT7xDgFYhhro0MKFm0LSfC3Yi3slWnZK\nN6o2yPZjqW5tsAJZ0IMm4EfEjbD8Dt9vkOoqe2+c5wZfXr3zHW/vbjV/OJsw\nebrx\r\n=CVBf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICIsBefWDavt4HCJ1YSU8H2026MNhWUYViEtXPXkTK3ZAiBqhC+m761h++BaEmhTnur4EH+1NM/qgrxgX5iOXZmM0Q=="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/observable-fns_0.5.0_1576384597882_0.7966091194337315"},"_hasShrinkwrap":false},"0.5.1-test":{"name":"observable-fns","version":"0.5.1-test","description":"Light-weight observable implementation and utils written in TypeScript. Based on zen-observable.","author":{"name":"Andy Wermke","url":"https://github.com/andywer"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/andywer/observable-fns.git"},"module":"./dist.esm/index.js","sideEffects":["**/_symbols.js"],"scripts":{"prebuild":"rimraf dist/ dist.esm/","build":"run-s build:cjs build:esm","build:cjs":"tsc","build:esm":"tsc -p ./tsconfig.esm.json","create-entrypoints":"rimraf *.js *.d.ts && node ./scripts/create-entrypoints.js","test":"ava","posttest":"tslint --project .","prepare":"run-s build create-entrypoints"},"devDependencies":{"ava":"^2.4.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","ts-node":"^8.5.4","tslint":"^5.18.0","tslint-config-prettier":"^1.18.0","typescript":"^3.5.3"},"ava":{"compileEnhancements":false,"extensions":["ts"],"files":["test/**/*.test.ts"],"require":["ts-node/register"]},"readme":"<h1 align=\"center\">\n  🕵️‍♀️ observable-fns\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/andywer/observable-fns\" target=\"_blank\"><img alt=\"Build status\" src=\"https://img.shields.io/travis/andywer/observable-fns/master.svg?style=flat-square\"></a>\n  <a href=\"https://www.npmjs.com/package/observable-fns\" target=\"_blank\"><img alt=\"npm version\" src=\"https://img.shields.io/npm/v/observable-fns.svg?style=flat-square\"></a>\n  <a href=\"https://bundlephobia.com/result?p=observable-fns\" target=\"_blank\"><img alt=\"Complete bundle size\" src=\"https://badgen.net/bundlephobia/min/observable-fns\"></a>\n</p>\n\nLight-weight Observable implementation and common toolbelt functions. Based on [`zen-observable`](https://github.com/zenparsing/zen-observable), re-implemented in TypeScript. Zero dependencies, [tree-shakeable](https://bitsofco.de/what-is-tree-shaking/).\n\nThe aim is to provide a lean Observable implementation with a small footprint that's fit to be used in libraries as an alternative to the huge RxJS.\n\nFind all the provided functions and constructors in the 👉 [API Documentation](./docs/API.md)\n\n<br>\n\n🧩&nbsp;&nbsp;Composable functional streams\n\n🚀&nbsp;&nbsp;map(), filter() & friends support async handlers\n\n🔩&nbsp;&nbsp;Based on popular [`zen-observable`](https://github.com/zenparsing/zen-observable), re-implemented in TypeScript\n\n🌳&nbsp;&nbsp;Zero dependencies, [tree-shakeable](https://bitsofco.de/what-is-tree-shaking/)\n\n---\n\n## Installation\n\n```\nnpm install observable-fns\n```\n\n## Observable?\n\nAn observable is basically a stream of asynchronously emitted values that you can subscribe to. In a sense it is to the event emitter what the promise is to the callback.\n\nThe main difference to a promise is that a promise only resolves once, whereas observables can yield values repeatedly. They can also fail with an error, like a promise, and they come with a completion event to indicate that no more values will be send.\n\nFor a quick introduction on how to use observables, check out the [zen-observable readme](https://github.com/zenparsing/zen-observable).\n\n```js\nimport { Observable, multicast } from \"observable-fns\"\n\nfunction subscribeToServerSentEvents(url) {\n  // multicast() will make the observable \"hot\", so multiple\n  // subscribers will share the same event source\n  return multicast(new Observable(observer => {\n    const eventStream = new EventSource(url)\n\n    eventStream.addEventListener(\"message\", message => observer.next(message))\n    eventStream.addEventListener(\"error\", error => observer.error(error))\n\n    return () => eventStream.close()\n  }))\n}\n\nsubscribeToServerSentEvents(\"http://localhost:3000/events\")\n  .filter(event => !event.isStale)\n  .subscribe(event => console.log(\"Server sent event:\", event))\n```\n\n## Usage\n\nYou can import everything you need directly from the package:\n\n```js\nimport { Observable, flatMap } from \"observable-fns\"\n```\n\nIf you write front-end code and care about bundle size, you can either depend on tree-shaking or explicitly import just the parts that you need:\n\n```js\nimport Observable from \"observable-fns/observable\"\nimport flatMap from \"observable-fns/flatMap\"\n```\n\nFunctions like `filter()`, `flatMap()`, `map()` accept asynchronous handlers – this can be a big win compared to the usual methods on `Observable.prototype` that only work with synchronous handlers.\n\nThose functions will also make sure that the values are consistently emitted in the same order as the input observable emitted them.\n\n```js\nimport { Observable, filter } from \"observable-fns\"\n\nconst existingGitHubUsersObservable = Observable.from([\"andywer\", \"bcdef\", \"charlie\"])\n  .pipe(\n    filter(async name => {\n      const response = await fetch(`https://github.com/${name}`)\n      return response.status === 200\n    })\n  )\n```\n\n## API\n\nSee [docs/API.md](./docs/API.md) for an overview of the full API.\n\n## License\n\nMIT\n","readmeFilename":"README.md","gitHead":"b691e99ce37863c38ecdd755b711cdb1be21e751","bugs":{"url":"https://github.com/andywer/observable-fns/issues"},"homepage":"https://github.com/andywer/observable-fns#readme","_id":"observable-fns@0.5.1-test","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-2q+QRLkxq70L0CHrmIo8dqnLJ4SPvTy6x0Z8+4Le2ANqO9Jc7FOl++QHKEJD0D0Lx98x5X9VSDetFjfC+PC2qQ==","shasum":"041d9b7acdc5c3fef255c15d4ab095bd15acaf8f","tarball":"https://registry.npmjs.org/observable-fns/-/observable-fns-0.5.1-test.tgz","fileCount":83,"unpackedSize":97376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSG6KCRA9TVsSAnZWagAAii4P/3hEGIbxEKs4JaDD+WsM\n3f86FuU/aSNJMmwcMXNW5B3NbwOsq/BEkhp4DBLQDROinBraB2uT3M7MpjO/\nZfviyRkP9dXczV+kOnIxFVZ4SDlOzgQifSZUi50SeW4N2VWgto1d5EMlrIfJ\nVnzXEun2YTf9vHbTHPTNoktdtNqwcPXYigbamMZw72AJLRvX9ayiPRAeP89L\nAis/OtkRNRjoiF39lGGxHbFPJ6GBIObNy0hwWRWVjEti+nv2xliZkWX4GEWs\nk933Vn0Yu6ZmnYrDdbXAJ5xlMPZpRbLEECrIfkNM+TZ6SoJag3dFefNQ8HXk\nmAW7M3NLabmfDCMq6wP4UC977YLJ/tgMiyz7kyupkMqAU337oNpBt5ih8d33\nk2xbD9PJKrCHbUUR5lDh0jjfRlfJrlOrQNbOzPhsFjXLGZeVunF4bIPeyzIr\n7gEZK4xmx6zn8JO690HoOU5wUmt+x1JNpRF4gvU0ULht9vQhettaN5K1vRi5\nFyYREXsy9IFNf33LeuUQgUhpPCOHuG2bvYySOIQOihxB2jxMoXxlaF48tnMd\nSRxrbovlk6ijQvEzRRamG4IY+sVVtUr4B8W0gLRuTr3yURnobCS5YA8SygFd\nF/51ZZPsgMHYajUu3RgqXvR6p20fYl/CmlvWf1OjDgirgVbxiFBAaS1p7W23\nyEPZ\r\n=z0eo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVa9CSHL15aMv77M6FEGWqf4qtFKYKM/AUzsfIXTg/MwIgeP0t+7IzFZbP0siOw6SrPeGlvkPxjGg9T1PqYT9MSTE="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/observable-fns_0.5.1-test_1581805193625_0.48091439573267025"},"_hasShrinkwrap":false},"0.5.1":{"name":"observable-fns","version":"0.5.1","description":"Light-weight observable implementation and utils written in TypeScript. Based on zen-observable.","author":{"name":"Andy Wermke","url":"https://github.com/andywer"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/andywer/observable-fns.git"},"module":"./dist.esm/index.js","sideEffects":["**/_symbols.js"],"scripts":{"prebuild":"rimraf dist/ dist.esm/","build":"run-s build:cjs build:esm","build:cjs":"tsc","build:esm":"tsc -p ./tsconfig.esm.json","create-entrypoints":"rimraf *.js *.d.ts && node ./scripts/create-entrypoints.js","test":"ava","posttest":"tslint --project .","prepare":"run-s build create-entrypoints"},"devDependencies":{"ava":"^2.4.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","ts-node":"^8.5.4","tslint":"^5.18.0","tslint-config-prettier":"^1.18.0","typescript":"^3.5.3"},"ava":{"compileEnhancements":false,"extensions":["ts"],"files":["test/**/*.test.ts"],"require":["ts-node/register"]},"gitHead":"20723298da3467045a655cf7f3bf7fc7a5bf7446","bugs":{"url":"https://github.com/andywer/observable-fns/issues"},"homepage":"https://github.com/andywer/observable-fns#readme","_id":"observable-fns@0.5.1","_nodeVersion":"10.16.3","_npmVersion":"6.13.4","dist":{"integrity":"sha512-wf7g4Jpo1Wt2KIqZKLGeiuLOEMqpaOZ5gJn7DmSdqXgTdxRwSdBhWegQQpPteQ2gZvzCKqNNpwb853wcpA0j7A==","shasum":"9b56478690dd0fa8603e3a7e7d2975d88bca0904","tarball":"https://registry.npmjs.org/observable-fns/-/observable-fns-0.5.1.tgz","fileCount":83,"unpackedSize":97371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTxSvCRA9TVsSAnZWagAAGoQP/RhjC38v5K+TXfvVD+wO\nhcKdMTCjS1Hcdlr8WT7evajsePeR8zebah9/3mgEPBZpNk+0is/z4U0iYov0\nAgMdWQU7V2ctpRAeBGy2ZbSEnCg5OeJ8OMsyW1ivDniAjUk5LQZuBVz8boN3\njoofC87WZS7qf0uZQuIJ0lAJrCXMe+ce4H8H4gSHIIUG1Er3Z9oHg9+iIxsP\nmwJ9C2RAJ1E56pMSzsIZ8tExEtlsSoxuME2Jal6ptlKwtNw0CObBd30OFGIz\nfYWx8Yddxm3mBiuFJNkQ6OFoZ6/Nm72BI9lf5jLaZnR2rtIPrXvSw9yeDAxe\nxZ6aHU276YvvV+3ftDqFfn2hDLhUjVCEVgGOX5q0JZCmQkpjNI7UVKn5leUs\nYORJnn38S44e5V8m96LYFSUoyrDx9NANkW718ddZZ1RLxbUXeQ4OaWLwlfDZ\nzIaGoftYFFaf3NaAGxlcKXBgpDA8pyoH5mcWhguhzBjTxJVkmou7RciweAgL\nhWh0Sqrp1SLHf1Xk9yzUcAem0gOHVlYoLOycGQyJH3BC96rTbFjT6orOdAUq\npPd3ovn5b/SbgTYYZhY2Q4AvbUOKb31dk3RmawVQmYodxYva92BwnjTa3QXE\nPFyKvOmJULyaSGtQtt0KGOQpGvsYbaVAo3QtH1oaJ6YcQqxUDQxJxQ5Odpv6\n9BhE\r\n=c3yg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIALLm/VEfORjkooTGpPSAaT5gN2Srllu2HUIgQF2O2dbAiEApCYD/G0E+0zLEyMoOGMxlI7z18hcGbQstnrd8LlaMSk="}]},"maintainers":[{"name":"andywer","email":"andy.dev@next-step-software.com"}],"_npmUser":{"name":"andywer","email":"andy.dev@next-step-software.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/observable-fns_0.5.1_1582240943546_0.5377060248881862"},"_hasShrinkwrap":false},"0.6.0":{"name":"observable-fns","version":"0.6.0","description":"Light-weight observable implementation and utils written in TypeScript. Based on zen-observable.","author":{"name":"Andy Wermke","url":"https://github.com/andywer"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/andywer/observable-fns.git"},"module":"./dist.esm/index.js","sideEffects":["**/_symbols.js"],"scripts":{"prebuild":"rimraf dist/ dist.esm/","build":"run-s build:cjs build:esm","build:cjs":"tsc","build:esm":"tsc -p ./tsconfig.esm.json","create-entrypoints":"rimraf *.js *.d.ts && node ./scripts/create-entrypoints.js","test":"ava","posttest":"tslint --project .","prepare":"run-s build create-entrypoints"},"devDependencies":{"ava":"^3.15.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","ts-node":"^10.0.0","tslint":"^5.18.0","tslint-config-prettier":"^1.18.0","typescript":"^4.3.2"},"ava":{"extensions":["ts"],"files":["test/**/*.test.ts"],"require":["ts-node/register"]},"gitHead":"98a78bc759e80a67a62d269ec512f6238f6262f9","bugs":{"url":"https://github.com/andywer/observable-fns/issues"},"homepage":"https://github.com/andywer/observable-fns#readme","_id":"observable-fns@0.6.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-oxa1XYBMaHEjfVTXtOWiFBkJS933nqe9Lme5Dg4kDafTlfjN7fOci1BA0oCBK5LXLsS3a4yjHFZnlORSzdAUTg==","shasum":"65770d013ee52435bafb209b41d2f59398365508","tarball":"https://registry.npmjs.org/observable-fns/-/observable-fns-0.6.0.tgz","fileCount":83,"unpackedSize":99825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsRPPCRA9TVsSAnZWagAABywP/A+kDQBc6vohoPAFZogi\n+QFMwhRUPrzCibR2uGhZDY+WX/m3RD7ByJv73i0+cAe1UpvBCXy2eWPtzdhj\n8XVd7MWfhUJxKWXGT5Ix773YU5c3OeM3e4LHfMOSh+vMD1ceGllarJA2RJv6\n2eEWKWlX/tossYDOEgI5M58BJkORmyXRwAcgYvCK0YcIjwc+GdT608W/iTpy\nOfgvaqjAOvb2fdOJpex5EGckVeMN68v2qfoIy9MaaeYRovRcO2N/bq1yWeD4\nrmfTb25aMYzs/GbZB+Ypz8yFy5EyNkg3UteMpkIjN3ndMiqaKSgBLGmoG0Aq\nWaM3GKb0W1S5Vwi9UkJP2NSnkm3uUcQ+bozASRQN+Xkg9TPtZBHYJBKLjA7m\n8UEJhM6ctQ9GlHMAWhIiVC8p9h9PbOpSPshXwRWINJmW26LqQPdGPmL6pOn+\nwFPxiG0Gr5c5uplZxTvHlxGRT4MWU2DshjAW41c4SuJphUzfvkoYpzPV6v3K\nL1HlwPumhzZlqn6Xq1XHN1+ZS3DvmPYnqb8E92ztiZGda3Gv6rAyAVBwOZqb\ntw4ptTuOqmN+LF9v/bV/1KZU4zDqbqtWhRSA6DRKs80ysDMbxCnCR/Ou5md6\ntWetV9CR11U+vO/nocjUtbFowQVrFH+YX9cIlmJSe7TUGI6a32aEFz3V5c2H\nlBJO\r\n=kz+d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGM6mWyOw4zQCX8i/a1qoRuWbAtlfK11wky+VUUtKrzKAiEA4zohipPi/UQKy2E5xDeLj4lmRDL0eBSd4pI8Xi/58rs="}]},"_npmUser":{"name":"andywer","email":"github@andywer.com"},"directories":{},"maintainers":[{"name":"andywer","email":"github@andywer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/observable-fns_0.6.0_1622217678599_0.07780149768017108"},"_hasShrinkwrap":false},"0.6.1":{"name":"observable-fns","version":"0.6.1","description":"Light-weight observable implementation and utils written in TypeScript. Based on zen-observable.","author":{"name":"Andy Wermke","url":"https://github.com/andywer"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/andywer/observable-fns.git"},"module":"./dist.esm/index.js","sideEffects":["**/_symbols.js"],"scripts":{"prebuild":"rimraf dist/ dist.esm/","build":"run-s build:cjs build:esm","build:cjs":"tsc","build:esm":"tsc -p ./tsconfig.esm.json","create-entrypoints":"rimraf *.js *.d.ts && node ./scripts/create-entrypoints.js","test":"ava","posttest":"tslint --project .","prepare":"run-s build create-entrypoints"},"devDependencies":{"ava":"^3.15.0","npm-run-all":"^4.1.5","rimraf":"^2.6.3","ts-node":"^10.0.0","tslint":"^5.18.0","tslint-config-prettier":"^1.18.0","typescript":"^4.3.2"},"ava":{"extensions":["ts"],"files":["test/**/*.test.ts"],"require":["ts-node/register"]},"gitHead":"3e22fa7ab02f8a62395a1721763a83db5d4164d1","bugs":{"url":"https://github.com/andywer/observable-fns/issues"},"homepage":"https://github.com/andywer/observable-fns#readme","_id":"observable-fns@0.6.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.11","dist":{"integrity":"sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg==","shasum":"636eae4fdd1132e88c0faf38d33658cc79d87e37","tarball":"https://registry.npmjs.org/observable-fns/-/observable-fns-0.6.1.tgz","fileCount":88,"unpackedSize":100083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgs+IkCRA9TVsSAnZWagAA4yUP/Ri6HfWv9ArHjRzl8Dhy\n/U0rZIODBaeDMJgo3tKSKAELHvs4kzZkFDRk5gsbzGqnQvHQVEtb6UJmytjL\nHLt962E+/y1InB3cZ1MF5BIyNuilZ90bjLI86/oL6CgUIGK40nMqfZtgNzWT\nJw8Twj/6/HSfK8iJwFLwGObso0wScXeK7YFyU+9CChOdWpUk20FYN+A+h9+E\n4smEoY6oaYkxHP4ij6jKXj/HTmdz5Ps/YJBSY5O5sLGUwtRuOxYu807opISB\nQpsOLyOfY/rFkaKIH/IX5sSA4dzHz4tmp+kTVVl4AijxksobBEHwnySyJz/R\nTnQy4u5frRMnx7DCSuoT7pvt8Yh1l8ZQ0SsrXM57mu+XO7R9kDTT+2prcCn9\nd956OQ3AL/Qo7sxC3eK3Fb2sPOIfvDMt2qRORY09Tktv0QWIzS0wDO1jpHzy\ndBltIXCrECN5zBdcuA4WQ4MMoDw+0GK8Eh+0Rx64NJxBOfPU/s2z3/5jr41K\nDvy+beEc7IgUPw2KdjyIqopH+czyklAFmt9Hp5Ag4yh32InGcmcrwPR2D0Q2\n3om2Rui5K4EfYEbs9qsHg8LnQC1bHQyQDhDGuw3eU8atlaVbFvlFJK+GmAqx\nLWizNmtQgcUCvFFpJ9rrY8jQjjUhh0LJFraPU65SSd7D9z5IXccFivQBIFz7\nIQG0\r\n=9TyI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICc0egelwqUuHwuIePv6FJHILBdRU5Kqqlf0/FbSOx5/AiArDrEnHJkjz4TbXiL77+bI15uGZJAUBU7HGaGzbjClRQ=="}]},"_npmUser":{"name":"andywer","email":"github@andywer.com"},"directories":{},"maintainers":[{"name":"andywer","email":"github@andywer.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/observable-fns_0.6.1_1622401572228_0.18740240338766112"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-08T18:21:59.032Z","0.4.0":"2019-12-08T18:21:59.186Z","modified":"2022-05-12T01:27:39.992Z","0.5.0":"2019-12-15T04:36:38.022Z","0.5.1-test":"2020-02-15T22:19:53.779Z","0.5.1":"2020-02-20T23:22:23.629Z","0.6.0":"2021-05-28T16:01:18.765Z","0.6.1":"2021-05-30T19:06:12.355Z"},"maintainers":[{"name":"andywer","email":"github@andywer.com"}],"description":"Light-weight observable implementation and utils written in TypeScript. Based on zen-observable.","homepage":"https://github.com/andywer/observable-fns#readme","repository":{"type":"git","url":"git+https://github.com/andywer/observable-fns.git"},"author":{"name":"Andy Wermke","url":"https://github.com/andywer"},"bugs":{"url":"https://github.com/andywer/observable-fns/issues"},"license":"MIT","readme":"<h1 align=\"center\">\n  🕵️‍♀️ observable-fns\n</h1>\n\n<p align=\"center\">\n  <a href=\"https://travis-ci.org/andywer/observable-fns\" target=\"_blank\"><img alt=\"Build status\" src=\"https://img.shields.io/travis/andywer/observable-fns/master.svg?style=flat-square\"></a>\n  <a href=\"https://www.npmjs.com/package/observable-fns\" target=\"_blank\"><img alt=\"npm version\" src=\"https://img.shields.io/npm/v/observable-fns.svg?style=flat-square\"></a>\n  <a href=\"https://bundlephobia.com/result?p=observable-fns\" target=\"_blank\"><img alt=\"Complete bundle size\" src=\"https://badgen.net/bundlephobia/min/observable-fns\"></a>\n</p>\n\nLight-weight Observable implementation and common toolbelt functions. Based on [`zen-observable`](https://github.com/zenparsing/zen-observable), re-implemented in TypeScript. Zero dependencies, [tree-shakeable](https://bitsofco.de/what-is-tree-shaking/).\n\nThe aim is to provide a lean Observable implementation with a small footprint that's fit to be used in libraries as an alternative to the huge RxJS.\n\nFind all the provided functions and constructors in the 👉 [API Documentation](./docs/API.md)\n\n<br>\n\n🧩&nbsp;&nbsp;Composable functional streams\n\n🚀&nbsp;&nbsp;map(), filter() & friends support async handlers\n\n🔩&nbsp;&nbsp;Based on popular [`zen-observable`](https://github.com/zenparsing/zen-observable), re-implemented in TypeScript\n\n🌳&nbsp;&nbsp;Zero dependencies, [tree-shakeable](https://bitsofco.de/what-is-tree-shaking/)\n\n---\n\n## Installation\n\n```\nnpm install observable-fns\n```\n\n## Observable?\n\nAn observable is basically a stream of asynchronously emitted values that you can subscribe to. In a sense it is to the event emitter what the promise is to the callback.\n\nThe main difference to a promise is that a promise only resolves once, whereas observables can yield values repeatedly. They can also fail with an error, like a promise, and they come with a completion event to indicate that no more values will be send.\n\nFor a quick introduction on how to use observables, check out the [zen-observable readme](https://github.com/zenparsing/zen-observable).\n\n```js\nimport { Observable, multicast } from \"observable-fns\"\n\nfunction subscribeToServerSentEvents(url) {\n  // multicast() will make the observable \"hot\", so multiple\n  // subscribers will share the same event source\n  return multicast(new Observable(observer => {\n    const eventStream = new EventSource(url)\n\n    eventStream.addEventListener(\"message\", message => observer.next(message))\n    eventStream.addEventListener(\"error\", error => observer.error(error))\n\n    return () => eventStream.close()\n  }))\n}\n\nsubscribeToServerSentEvents(\"http://localhost:3000/events\")\n  .filter(event => !event.isStale)\n  .subscribe(event => console.log(\"Server sent event:\", event))\n```\n\n## Usage\n\nYou can import everything you need directly from the package:\n\n```js\nimport { Observable, flatMap } from \"observable-fns\"\n```\n\nIf you write front-end code and care about bundle size, you can either depend on tree-shaking or explicitly import just the parts that you need:\n\n```js\nimport Observable from \"observable-fns/observable\"\nimport flatMap from \"observable-fns/flatMap\"\n```\n\nFunctions like `filter()`, `flatMap()`, `map()` accept asynchronous handlers – this can be a big win compared to the usual methods on `Observable.prototype` that only work with synchronous handlers.\n\nThose functions will also make sure that the values are consistently emitted in the same order as the input observable emitted them.\n\n```js\nimport { Observable, filter } from \"observable-fns\"\n\nconst existingGitHubUsersObservable = Observable.from([\"andywer\", \"bcdef\", \"charlie\"])\n  .pipe(\n    filter(async name => {\n      const response = await fetch(`https://github.com/${name}`)\n      return response.status === 200\n    })\n  )\n```\n\n## API\n\nSee [docs/API.md](./docs/API.md) for an overview of the full API.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}