GitShow/sindresorhus/pify
sindresorhus

pify

Promisify a callback-style function

by sindresorhus
promise-utilitiespromisespromisify
Star on GitHubForknpm

JavaScript

1.5k stars72 forks16 contributorsQuiet · 3y agoSince 2015v6.1.0MIT

Meet the team

See all 16 on GitHub →
sindresorhus
sindresorhus48 contributions
dsblv
dsblv3 contributions
schnittstabil
schnittstabil2 contributions
Richienb
Richienb2 contributions
SamVerschueren
SamVerschueren2 contributions
tom-sherman
tom-sherman2 contributions
coreyfarrell
coreyfarrell1 contribution
DanSnow
DanSnow1 contribution

Languages

View on GitHub →
JavaScript71.5%
TypeScript28.5%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
tom-sherman
Fix readme typoMergedPR
tom-sherman · 3y ago
tom-sherman
Add TypeScript definitionsMergedPR

Closes #74 Pros and cons compared to #85 Pros: No need for as many overloads Supports as many generics as you like Support for as many callback arguments as you like when . Although not sure if this is in scope in the context of the options. Cons: returns instead of erroring - at runtime this promise will simply never resolve or reject. A bit of annoying DX but isn't unsafe. Todo: [x] Promisifying modules with includes and excludes [x] Document clearly that overloaded functions are not supported and only the final overload will be chosen: https://github.com/microsoft/TypeScript/issues/32164 [x] Support [x] Support IssueHunt Summary Referenced issues This pull request has been submitted to: #74: Add TypeScript type definition

tom-sherman · 3y ago
sindresorhus
Add TypeScript type definitionClosedIssue

Would be nice to have TypeScript type definitions bundled in this package. The types should be strict and should be generic so it preserves the original function type. The type definition should follow this styleguide, and should have full docs and type tests. Some examples: https://github.com/sindresorhus/semver-regex/commit/039944bb5b3876913171b895488874b5c200e458 https://github.com/sindresorhus/global-dirs/commit/0aae4d64887f77af94c4fb7ca12aa9f93c0a8291 https://github.com/sindresorhus/md5-hex/commit/bbbfeff840f26973fbffc16d4863ae6d120079f3 Note that this is not an easy task and requires you to have advanced TypeScript experience. There have been multiple attempts and a lot of wasted time on my part in the past. If you intend to work on this, please look at the previous attempts and the feedback given there. IssueHunt Summary tom-sherman has been rewarded. Backers (Total: $100.00) issuehunt ($80.00) omgimalexis ($20.00) Submitted pull Requests [#75 [WIP] Add TypeScript definition](https://issuehunt.io/r/sindresorhus/pify/pull/75) #76 Add index.d.ts and tests #85 Add TypeScript definition #86 Add TypeScript definitions Tips Checkout the Issuehunt explorer to discover more funded issues. Need some help from other developers? Add your repositories on IssueHunt to raise funds.

sindresorhus · 3y ago
Structured data for AI agents

Repository: sindresorhus/pify. Description: Promisify a callback-style function Stars: 1505, Forks: 72. Primary language: JavaScript. Languages: JavaScript (71.5%), TypeScript (28.5%). License: MIT. Topics: promise-utilities, promises, promisify. Latest release: v6.1.0 (3y ago). Open PRs: 0, open issues: 0. Last activity: 3y ago. Community health: 85%. Top contributors: sindresorhus, dsblv, schnittstabil, Richienb, SamVerschueren, tom-sherman, coreyfarrell, DanSnow, danthegoodman, fregante and others.

·@ofershap

Replace github.com with gitshow.dev