{"_id":"@adi_random/observable-js","_rev":"1-66b4e42b8fe846635f15d3813b6830fe","name":"@adi_random/observable-js","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@adi_random/observable-js","version":"1.0.0","description":"Observables for Javascript and Typescript","main":"dist/index.js","private":false,"types":"dist/index.d.ts","scripts":{"test":"jest","build":"tsc","publish":"npm run build && npm publish --access=public"},"repository":{"type":"git","url":"git+https://github.com/adiRandom/ObservableJs.git"},"keywords":["observables","observable-primitives","observable-types"],"author":{"name":"Adrian Pascu"},"license":"GNUv3","bugs":{"url":"https://github.com/adiRandom/ObservableJs/issues"},"homepage":"https://github.com/adiRandom/ObservableJs#readme","devDependencies":{"@types/collections":"^5.0.0","@types/jest":"^24.0.19","@types/node":"^12.11.6","jest":"^24.9.0","ts-jest":"^24.1.0","typescript":"^3.6.4"},"dependencies":{"collections":"^5.1.9"},"gitHead":"460b7dbd786fdfd4dddb3f181dc46a74ee4f9b60","_id":"@adi_random/observable-js@1.0.0","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-W+DHqVtMVlkh+M225NSHqhisF72o/PnVLje3dYWK75GPWEBoUmRVZmiXjvbUZKq8PZng0eUtb019c0AYhitndw==","shasum":"72151258b9b7d636b80d41ff6bb7cb8d46f0a2b7","tarball":"https://registry.npmjs.org/@adi_random/observable-js/-/observable-js-1.0.0.tgz","fileCount":9,"unpackedSize":50204,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdvWi0CRA9TVsSAnZWagAA4JYP/R8E7PThIknN1JBdsvQm\ncXSJaBQ7/lMrwm/XO7lPXi0UQzu5bO8cJzX8z64BqUuMRwqyoy/BYaeh2hjX\nZjhxIBReODJjEc8hSIjROMDahkM0SXiveQ9iP4YBUKHOeeBiAweaAXy0vtQR\nqX5Bc8gxax1K+BXEERBo7tO6k0nh5fkbCLX3vvJ3PclGf9jWKyA6PyLV4r24\nV+bMEMKN9NwEsVppN+6LbO6g1NuMIEwfGWMYRfqvEq+wVGWorUzTw8oDwGno\nI9qKupWMR6F/z/AUySjfF/437Tu3FzoQbvmZ1M9O8As4rWTyoBL44X3MggfH\nCIsHhEEnlKz9N8WQSNuAf+BlkiuEd+klX0cNg7cj/RRHVtIpwYYwRAejJ4+n\nLlRY8VMFaAfbeeLpE2cZO0s66UkqB0xR93aixRLK+tr+j1xXnkik829cuNuR\njZ8GtSDNajDu3hbNDI6f/hz2N97zMQyoS1eMLkjSaMxWmFh3bdo90v2q+BUC\ny1JXZ4L474mGTD1w09vHW3XXEnU4drnRENVcyTUShWIvEHcEKXXoopDboYUp\nnDC1PGSS7kHK1v5Q9da1KnTKYbjtd6AFUAowmoxgK0QWPxQ/Hq8THvs6ECUo\n0MjPvX2+sizkYMQ7BLPVcZpc1FXZowVlxqquC5XZm1dkGG9ggO0fBrY42RrR\nE873\r\n=lyOI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2VQOU0h+Vezt/+KZjLt9qFo2Dym50LT+W2de0NCrp5QIhALjC+TjHkOe61+9RnnelT2gioagGWsh/2C5Db0rwvQdZ"}]},"maintainers":[{"name":"adi_random","email":"me.adi.dev@gmail.com"}],"_npmUser":{"name":"adi_random","email":"me.adi.dev@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/observable-js_1.0.0_1572694195988_0.17638169417086846"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-02T11:29:55.751Z","1.0.0":"2019-11-02T11:29:56.146Z","modified":"2022-04-04T11:29:58.506Z"},"maintainers":[{"name":"adi_random","email":"me.adi.dev@gmail.com"}],"description":"Observables for Javascript and Typescript","homepage":"https://github.com/adiRandom/ObservableJs#readme","keywords":["observables","observable-primitives","observable-types"],"repository":{"type":"git","url":"git+https://github.com/adiRandom/ObservableJs.git"},"author":{"name":"Adrian Pascu"},"bugs":{"url":"https://github.com/adiRandom/ObservableJs/issues"},"license":"GNUv3","readme":"# ObservableJs\r\nObservables for Javascript and Typescript\r\n\r\nA library that creates a Observable class that let's you subscribe to a value and get notified when that value changes\r\n\r\n\r\n# Usage\r\n\r\n\r\n## *Create an Observable*\r\n\r\n    const  observable  =  new  Observable<T>(initalValue);\r\n\r\n`T` - The type of the value stored in the observable\r\n\r\n\r\n\r\n\r\n## *Change the value of an Observable*\r\n\r\n    const  observable  =  new  Observable<T>(initalValue);\r\n    observable.mutate(operation);\r\n\r\n`operation:(val \\<T>)=>T`  - An operation to be applied on the current value in the Observable. `Val` is the current value in that Observable. An operation should return a new value for that observable\r\n\r\n\r\n## *Subscribing to an Observable*\r\n\r\n\r\n    const  observable  =  new  Observable<T>(initalValue);\r\n    observable.subscribe(handler,options?)\r\n\r\n`handler : (value:T)=>void | Promise\\<any>` - A function that is called whenever a new value (`val`) is being issued by the Observable\r\n`options`:\r\n\r\n - `await`:  boolean (default: false) - Whether or not the result of the handler should be awaited, in case it returns a Promise\r\n - `fireOnSubscribe` : boolean (default: false) - Whether or not the hanlder should be called after the subscription\r\n - `Priority` : number (default: 0) - A value that determins the order in which the handlers should be executed. Greater priority means this handler will be executed sooner\r\n\r\n","readmeFilename":"README.MD"}