{"library":"rx-lite","title":"RxJS Lite (Legacy v4)","description":"rx-lite is a lightweight distribution of the Reactive Extensions for JavaScript (RxJS) version 4.x, primarily used for composing asynchronous and event-based operations in JavaScript. At version 4.0.8, it provided a core set of observable operators for handling events, promises, callbacks, and time-based operations in both modern browser environments (IE9+) and Node.js. The library was part of an earlier generation of RxJS, with its development repository transitioning to 'RxJS vNext' (which became RxJS v5 and later) after the 4.x series. This version prioritizes a compact bundle (`rx.lite.js`) for everyday use cases, differing from the more modular, tree-shakable approach adopted in subsequent major RxJS releases. It had an irregular release cadence, focusing on bug fixes and performance improvements within the 3.x and 4.x lines before the major architectural shift to modern RxJS.","language":"javascript","status":"abandoned","last_verified":"Tue Apr 21","install":{"commands":["npm install rx-lite"],"cli":null},"imports":["const Rx = require('rx-lite');","const Rx = require('rx-lite');\nconst Observable = Rx.Observable;","const Rx = require('rx-lite');\nconst myObservable = Rx.Observable.fromPromise(somePromise);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const Rx = require('rx-lite');\n\nconst source = Rx.Observable.fromArray([1, 2, 3, 4, 5]);\n\nconst subscription = source\n  .map(x => x * 2)\n  .filter(x => x > 5)\n  .subscribe(\n    x => console.log('Next: ' + x),\n    err => console.error('Error: ' + err),\n    () => console.log('Completed')\n  );\n\n// Example with a promise\nconst somePromise = Promise.resolve('Hello from Promise!');\nRx.Observable.fromPromise(somePromise)\n  .subscribe(\n    data => console.log('Promise data: ' + data),\n    err => console.error('Promise error: ' + err)\n  );\n\n// To stop listening (important for long-lived observables)\n// subscription.dispose();","lang":"javascript","description":"Demonstrates creating an observable from an array, applying map and filter operators, and subscribing to log values. Also shows converting a Promise to an Observable.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}