This package has been deprecated

Author message:

use @naturalcycles/js-lib instead

@naturalcycles/promise-lib
TypeScript icon, indicating that this package has built-in type declarations

2.5.0 • Public • Published

@naturalcycles/promise-lib

Useful promise functions, inspired by Bluebird, p-map, p-props

npm min.gz size Maintainability Test Coverage code style: prettier

Why

  • bluebird is outdated
  • p-props requires separate @types/p-props which has issues
  • Both p-map and p-props do export default, which is not IDE-friendly. IDEs don't automatically suggest to import these functions

Features

  • First-class Typescript support, typings included and working
  • IDE-friendly, IDE automatically suggest to import from proper place
  • Bundled as es2018, with native async/await, no transpilation
  • Based (almost copy-pasted) on battle-tested implementations (p-map), tests included

API

  • pMap
  • pBatch
  • pFilter
  • pProps
  • pDelay
  • pHang
  • pState - returns the current state of the Promise, one of resolved | rejected | pending.
  • pDefer

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i @naturalcycles/promise-lib

    Weekly Downloads

    1

    Version

    2.5.0

    License

    MIT

    Unpacked Size

    59.9 kB

    Total Files

    63

    Last publish

    Collaborators

    • kirillgroshkov
    • kribor