{"id":26902550,"url":"https://github.com/grachpower/rx-dects","last_synced_at":"2025-04-01T09:44:01.963Z","repository":{"id":65492096,"uuid":"166584787","full_name":"grachpower/rx-dects","owner":"grachpower","description":"Typescript decorators for RxJS","archived":false,"fork":false,"pushed_at":"2019-01-21T19:47:42.000Z","size":100,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T22:02:47.045Z","etag":null,"topics":["angular","decorator","decorators","reactive-programming","reactive-x","rx","rxjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grachpower.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-19T19:26:47.000Z","updated_at":"2022-11-05T21:58:35.000Z","dependencies_parsed_at":"2023-01-25T19:25:13.106Z","dependency_job_id":null,"html_url":"https://github.com/grachpower/rx-dects","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grachpower%2Frx-dects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grachpower%2Frx-dects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grachpower%2Frx-dects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grachpower%2Frx-dects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grachpower","download_url":"https://codeload.github.com/grachpower/rx-dects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620211,"owners_count":20806718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","decorator","decorators","reactive-programming","reactive-x","rx","rxjs","typescript"],"created_at":"2025-04-01T09:44:01.350Z","updated_at":"2025-04-01T09:44:01.953Z","avatar_url":"https://github.com/grachpower.png","language":"TypeScript","readme":"# RxJS Decorators\n[![npm version](https://badge.fury.io/js/rx-dects.svg)](https://badge.fury.io/js/rx-dects)\n[![Build Status](https://travis-ci.com/grachpower/rx-dects.svg?branch=master)](https://travis-ci.com/grachpower/rx-dects)\n\nRx-dects is a library with with typescript decorators which can help you to work with RxJs Observables. \n\n## Benefits\nDeclarative design to sharing and caching rxjs observables.\n\n## Examples\n\n - [Stackblitz Demo](https://stackblitz.com/edit/rs-dects-example) \n\n## Installation and Usage\n\nTo install this library, run:\n\n```bash\n$ npm install rx-dects\n```\n\nYou can import library in any application:\n\n```typescript\n  import { Observable, Observer } from 'rxjs';\n  import { SharedObservable, CachedObservable } from 'rx-dects';\n  \n  @Injectable()\n  export class DataService {\n    public fetchSomeData(): Observable\u003cany\u003e {\n      return this.generateObservable();\n    }\n  \n    @SharedObservable()\n    public fetchSharedData(): Observable\u003cany\u003e {\n      return this.generateObservable();\n    }\n  \n    @CachedObservable()\n    public fetchCachedData(): Observable\u003cany\u003e {\n      return this.generateObservable();\n    }\n  \n    @SharedObservable()\n    @CachedObservable()\n    public fetchCachedAndSharedData(): Observable\u003cany\u003e {\n      return this.generateObservable();\n    }\n  \n    public generateObservable(): Observable\u003cany\u003e {\n      return Observable.create((observer: Observer\u003cstring\u003e) =\u003e {\n        setTimeout(() =\u003e {\n          observer.next(`Data: ${Math.random() * 100}`);\n          observer.complete();\n        }, 200);\n      });\n    }\n  }\n```\n\n## Important\nImportant to install RxJS version 6 and above\n\n## Building/Testing\n\n- `npm run build` - builds everything\n- `npm test` - runs tests\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrachpower%2Frx-dects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrachpower%2Frx-dects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrachpower%2Frx-dects/lists"}