{"id":22096578,"url":"https://github.com/pksilen/optional-js-flow","last_synced_at":"2025-03-24T00:57:51.260Z","repository":{"id":43878545,"uuid":"217037665","full_name":"pksilen/optional-js-flow","owner":"pksilen","description":"JavaScript Optional type for functional programming with Flow","archived":false,"fork":false,"pushed_at":"2023-10-19T11:02:21.000Z","size":1479,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-13T19:17:01.977Z","etag":null,"topics":["flow","javascript","javascript-library","optional","type"],"latest_commit_sha":null,"homepage":"","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/pksilen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["paypal.me/pksilen"]}},"created_at":"2019-10-23T11:11:25.000Z","updated_at":"2023-05-08T13:26:40.000Z","dependencies_parsed_at":"2024-12-02T00:30:32.555Z","dependency_job_id":null,"html_url":"https://github.com/pksilen/optional-js-flow","commit_stats":null,"previous_names":["pksilen/optionaljs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Foptional-js-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Foptional-js-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Foptional-js-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pksilen%2Foptional-js-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pksilen","download_url":"https://codeload.github.com/pksilen/optional-js-flow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191638,"owners_count":20575248,"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":["flow","javascript","javascript-library","optional","type"],"created_at":"2024-12-01T04:11:44.802Z","updated_at":"2025-03-24T00:57:51.239Z","avatar_url":"https://github.com/pksilen.png","language":"JavaScript","readme":"# optional-js-flow\nJavaScript Optional type for functional programming with Flow\n\n[![version][version-badge]][package]\n[![build][build]][circleci]\n[![coverage][coverage]][codecov]\n[![MIT License][license-badge]][license]\n\n## Installation\n    npm install --save optional-js-flow\n    \n## Import library\n    import OptionalFactory from 'optional-js-flow';\n    import type { Optional } from 'optional-js-flow';\n    \n## Create Optional type\n    OptionalFactory.makeOptionalOf\u003cT\u003e(value: T | null | void): Optional\u003cT\u003e\n    OptionalFactory.makeEmptyOptional\u003cT\u003e(): Optional\u003cT\u003e\n\n## Use Optional type\n\n    map\u003cU\u003e(map: (value: T) =\u003e U): Optional\u003cU\u003e;\n    orElse(elseValue: T): T;\n    ifPresent(consume: (value: T) =\u003e void): void;\n    orElseSupplyValue(supplyElseValue: () =\u003e T): T;\n    ifPresentOrElse(consume: (value: T) =\u003e void, performAction: () =\u003e void): void;\n    filter(isTrue: (value: T) =\u003e boolean): Optional\u003cT\u003e;\n    flatMap\u003cU\u003e(map: (value: T) =\u003e Optional\u003cU\u003e): Optional\u003cU\u003e;  \n\n## License\nMIT License\n\n[license-badge]: https://img.shields.io/badge/license-MIT-green\n[license]: https://github.com/pksilen/optional-js-flow/blob/master/LICENSE\n[version-badge]: https://img.shields.io/npm/v/optional-js-flow.svg?style=flat-square\n[package]: https://www.npmjs.com/package/optional-js-flow\n[build]: https://img.shields.io/circleci/project/github/pksilen/optional-js-flow/master.svg?style=flat-square\n[circleci]: https://circleci.com/gh/pksilen/optional-j-flows/tree/master\n[coverage]: https://img.shields.io/codecov/c/github/pksilen/optional-js-flow/master.svg?style=flat-square\n[codecov]: https://codecov.io/gh/pksilen/optional-js-flow\n","funding_links":["paypal.me/pksilen"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpksilen%2Foptional-js-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpksilen%2Foptional-js-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpksilen%2Foptional-js-flow/lists"}