{"id":26241214,"url":"https://github.com/repetere/promisie","last_synced_at":"2025-06-23T00:04:59.963Z","repository":{"id":57331664,"uuid":"50552239","full_name":"repetere/promisie","owner":"repetere","description":"promisify and promisifyAll methods for ES6 native Promises","archived":false,"fork":false,"pushed_at":"2020-07-10T19:52:54.000Z","size":2047,"stargazers_count":6,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-26T22:16:39.425Z","etag":null,"topics":["composition","functional","functional-js","native-es6-promises","promises"],"latest_commit_sha":null,"homepage":null,"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/repetere.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":"2016-01-28T03:32:23.000Z","updated_at":"2020-04-30T18:55:50.000Z","dependencies_parsed_at":"2022-09-10T06:02:19.597Z","dependency_job_id":null,"html_url":"https://github.com/repetere/promisie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/repetere/promisie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Fpromisie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Fpromisie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Fpromisie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Fpromisie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/repetere","download_url":"https://codeload.github.com/repetere/promisie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/repetere%2Fpromisie/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261386724,"owners_count":23150869,"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":["composition","functional","functional-js","native-es6-promises","promises"],"created_at":"2025-03-13T08:19:52.113Z","updated_at":"2025-06-23T00:04:54.833Z","avatar_url":"https://github.com/repetere.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Promisie\n[![Coverage Status](https://coveralls.io/repos/github/typesettin/promisie/badge.svg?branch=master)](https://coveralls.io/github/typesettin/promisie?branch=master)\n[![Build Status](https://travis-ci.org/typesettin/promisie.svg?branch=master)](https://travis-ci.org/typesettin/promisie) [![NPM version](https://badge.fury.io/js/promisie.svg)](http://badge.fury.io/js/promisie) [![Downloads Per Month](https://img.shields.io/npm/dm/promisie.svg?maxAge=2592000)](https://www.npmjs.com/package/promisie) [![npm](https://img.shields.io/npm/dt/promisie.svg?maxAge=2592000)]() [![Join the chat at https://gitter.im/typesettin/promisie](https://badges.gitter.im/typesettin/promisie.svg)](https://gitter.im/typesettin/promisie?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n[![Download Stats](https://nodei.co/npm/promisie.png?downloads=true\u0026downloadRank=true)](https://www.npmjs.com/package/promisie)\n\nPromisie is an extension of the ES6 native Promise class that provides helpful static methods that are seen in many other Promise libraries\n\n\n\u003cp style=\"text-align:center;\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/typesettin/promisie/master/doc/promisie.png\" alt=\"Promisie Logo\" width=\"300px\" height=\"auto\" style=\"margin:auto; text-align:center;\"\u003e\u003c/p\u003e\n\n### Version\n2.0.0-alpha.0\n### Installation\nBecause Promisie uses native ES6 Promises, classes and spread operators you must be running Node v6.0.0 or above\n```sh\n$ npm i promisie\n```\n### Usage\n```javascript\n/*\nBecause Promisie is an extension of the Promise class it also acts as a Promise constructor and shares all prototype methods, but adds promisify and promisifyAll static methods\n*/\nconst Promisie = require('promisie'),\n    fs = require('fs');\nvar readFileAsync = Promisie.promisify(fs.readFile);\nreadFileAsync('/some/file/path').then(fileData =\u003e { ... });\nvar asyncFs = Promisie.promisifyAll(fs);\nasyncFs.readFileAsync('/some/file/path').then(fileData =\u003e { ... });\n/*\nPromisie also exposes a \"try\" method which works just like \"then\" but conveniently wrapped in a try/catch block\n */\nreadFileAsync('/some/file/path')\n\t.try(data =\u003e {\n\t\treturn data.some.fake.property; //Cant't read property ... of undefined\n\t})\n\t.catch(e =\u003e { ... });\n/*\nThis would normally halt the execution of your async code because of an unhandled error but the \"try\" method properly rejects with the error\n */\n/*\nPromisie also has a series static method which runs and array of functions in series passing the result of each function to the next function.\nAdditionally there are pipe and compose static methods which return a function expecting arguments that will be passed to the first function in the series (compose reverses the order of the functions it is passed)\n*/\nlet array_of_functions = [fn, fn1, fn2, fn3];\nPromisie.series(array_of_functions)\n    .then(result =\u003e {\n        //result is the resolved value of the last function in the array\n    })\nlet pipe = Promisie.pipe(array_of_functions);\npipe('some', 'random', 'arguments')\n    .then(result =\u003e {\n        //result is still the resolved value of the last function in the array with the difference being the first function will be passed the arguments of pipe()\n    })\n/*\nPromisie now has many more helpful methods:\n- .map\n- .each\n- .parallel\n- .doWhilst\n- .iterate\n- .settle\n- .all\n- .retry\nSee documentation for more details and test for usage\n*/\n```\n### Notes\n* Check out [https://github.com/typesettin/promisie](https://github.com/typesettin/promisie) for the full promisie Documentation\n\n### Testing\n```sh\n$ npm i promisie\n$ cd ./node_modules/promisie\n$ npm i\n$ npm test\n```\n### For generating documentation\n```sh\n$ grunt doc\n$ jsdoc2md utility/**/*.js index.js \u003e doc/api.md\n```\n### Todos\n- Add more prototype and static methods\n    - Filter\n    - Reduce\n    - Queue\n\nLicense\n----\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepetere%2Fpromisie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frepetere%2Fpromisie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frepetere%2Fpromisie/lists"}