{"id":18050646,"url":"https://github.com/evangilo/jpromise","last_synced_at":"2025-06-29T13:04:49.300Z","repository":{"id":77810893,"uuid":"95603296","full_name":"evangilo/jpromise","owner":"evangilo","description":"A Promise library for Java, based on https://github.com/taylorhakes/promise-polyfill","archived":false,"fork":false,"pushed_at":"2018-02-11T14:15:35.000Z","size":56,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T09:17:56.284Z","etag":null,"topics":["java","javascript","jpromise","promise"],"latest_commit_sha":null,"homepage":"","language":"Java","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/evangilo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-06-27T21:42:15.000Z","updated_at":"2023-09-01T13:10:03.000Z","dependencies_parsed_at":"2023-06-04T17:45:36.865Z","dependency_job_id":null,"html_url":"https://github.com/evangilo/jpromise","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evangilo/jpromise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evangilo%2Fjpromise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evangilo%2Fjpromise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evangilo%2Fjpromise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evangilo%2Fjpromise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evangilo","download_url":"https://codeload.github.com/evangilo/jpromise/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evangilo%2Fjpromise/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262598166,"owners_count":23334669,"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":["java","javascript","jpromise","promise"],"created_at":"2024-10-30T21:12:37.316Z","updated_at":"2025-06-29T13:04:49.268Z","avatar_url":"https://github.com/evangilo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JPromise\n\nA Promise library for Java, based on [Promise-Polyfill](https://github.com/taylorhakes/promise-polyfill)\n\n## Installation\n\n### Gradle\n\n```\n    repositories {\n        maven {\n            url \"http://dl.bintray.com/evngilo/jpromise\"\n        }\n    }\n```\n\n```\n    compile 'com.evangilo.jpromise:jpromise:0.1.2'\n```\n\n## Usage\n\n### Promise\n\n```java\n    new Promise((resolve, reject) -\u003e {\n        ...\n        resolve.apply(Arrays.asList(1, 2, 3));\n    }).then((List\u003cInteger\u003e numbers) -\u003e {\n        ...\n        return sum(numbers);\n    }).then((Integer result) -\u003e {\n        ...\n        return result * 2;\n    }).fail(error -\u003e {\n        ...\n        return error;\n    });\n```\n\n### Promise All\n\n```java\n    List\u003cPromise\u003e promises = Arrays.asList(p1, p2);\n    Promise.all(promises).then(result -\u003e {\n        ...\n        return result;\n    });\n```\n\n### Promise Race\n\n```java\n    List\u003cPromise\u003e promises = Arrays.asList(p1, p2);\n    Promise.race(promises)\n        .then(value -\u003e value * 2)\n        .fail(error -\u003e {\n            println(error);\n            return null;\n        });\n```\n\n### Promise Resolve\n\n```java\n    Promise.resolve(100).then(value -\u003e value * 2);\n```\n\n### Promise Resolve\n\n```java\n    Promise.reject(100).then(error -\u003e {\n        println(error);\n        return null;\n    });\n```\n\n## License\n\n```\nCopyright (c) 2017 evangilo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevangilo%2Fjpromise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevangilo%2Fjpromise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevangilo%2Fjpromise/lists"}