npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

promises3

v0.1.0

Published

A Promise A+ implementation for ES3.

Readme

PromisEs3

Introduction

PromisEs3 is a implementation of Promise/A+ for ES3. Its single-file and dependence-free features are designed for maximum compatibility, which is important when buiding/packing/moduling tools are not available or old browsers (like IE6) need to be considered.

This Promise implemented by this project have passed the Promise/A+ test.

Although the basic part are written in pure ES3 syntax and functions, it can make use of some ES3+ or non-standard function to obtain additional performance.

Usage

Include by <script> Tag

You can

When included by <script> tag, it will act as an polyfill, which means that create the Promise class in the global scope when it dosen't exist.

As Module

When PromisEs3 are imported as a module, it directly exports the the Promise class.

Can be used as:

  • As Node.js (+ CommonJS) + npm module

    1. Download by npm as promises3 package.
    2. Include as module promises3 (require("promises3")).
  • AMD module.

  • CMD module.

Known Issue

  • As most of the Promise implementation, the Promise.prototype.toString are directly inherited from Object.prototype.toString and not have been overwritten. Only when Symbol.toStringTag is available, the result of promise.toString() and Object.prototype.toString.call(promise) is guaranteed to be "[object Promise]".

  • When the iterable protocol is not available, Promise.all, Promise.allSettled an other static functions takes ArrayLike as Iterable.

  • On the branch with-any, a static function Promise.any is implemented. An Exception class called AggregateError which is needed by Promise.any is also implemented and exported. However, they cannot be fully polyfilled under ES5. As these 2 features are still in working draft (see MDN) and not be included in any main-stream browsers, using it is strongly deprecated.

Notice

  • Some properties of the Promise object has keys embraced by "[[]]". These properties should be seen as private properties and should not be modified externally.

  • In some ES3 browsers, if a object member's key is a JavaScript keyword, accessing it by operator . is not allowed. You can use promise["catch"] and promise["finally"] instead of promise.catch and promise.finally. Some tools, like babel/plugin-transform-member-expression-literals may help you covert these codes automatically.

License and Copyright

MIT Licence. See LICENSE.md.

Copyright (c) 2020 Yichen Liu.