{"id":18711908,"url":"https://github.com/algolia/eventual-values","last_synced_at":"2025-04-12T12:31:03.330Z","repository":{"id":57231393,"uuid":"62817597","full_name":"algolia/eventual-values","owner":"algolia","description":null,"archived":true,"fork":false,"pushed_at":"2018-07-16T08:41:52.000Z","size":27,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-03-14T05:02:32.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/algolia.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-07T15:25:45.000Z","updated_at":"2023-01-28T18:09:59.000Z","dependencies_parsed_at":"2022-09-04T21:40:16.969Z","dependency_job_id":null,"html_url":"https://github.com/algolia/eventual-values","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Feventual-values","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Feventual-values/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Feventual-values/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algolia%2Feventual-values/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algolia","download_url":"https://codeload.github.com/algolia/eventual-values/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248566461,"owners_count":21125670,"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":[],"created_at":"2024-11-07T12:40:43.571Z","updated_at":"2025-04-12T12:31:02.950Z","avatar_url":"https://github.com/algolia.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# eventual-values\n\n`eventual-values` is a tiny JS library that lets you to create values that are themselved pending, errored, or resolved. It is inspired by the [eventual](https://github.com/Gozala/eventual) library.\n\n## Installation\n\n`eventual-values` is available on npm:\n\n```bash\nnpm install eventual-values\n```\n\n\n## Usage\n\n```js\nvar eventual = require('eventual-values');\n\n// Create an eventual value\nvar val = eventual();\n\n// Check its status\neventual.isReady(val);   // =\u003e false\neventual.isError(val);   // =\u003e false\neventual.isPending(val); // =\u003e true\n\n// reject the value\nval = eventual.reject('Access denied');\neventual.isReady(val);   // =\u003e false\neventual.isError(val);   // =\u003e true\neventual.isPending(val); // =\u003e false\n\n// Any error is an errored value\neventual.isError(new Error('Access denied')); // =\u003e true\n\n// Any other value is a resolved value\neventual.isReady('OK');   // =\u003e true\neventual.isError('OK');   // =\u003e false\neventual.isPending('OK'); // =\u003e false\n```\n\n### With ES2015\n\n```js\nimport eventual, {isReady} from 'eventual-values';\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgolia%2Feventual-values","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgolia%2Feventual-values","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgolia%2Feventual-values/lists"}