Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-af

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-af

Async/Await Fun

  • 5.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
94
increased by36.23%
Maintainers
1
Weekly downloads
 
Created
Source

npm bundle size (minified + gzip) npm version yarn version unpkg version codecov MIT License


README in progress...come back another time to lay eyes on the most beautiful documentation you've ever seen! 😍

In the meantime, check out the docs! 🚀

Or, see how to contribute. 💙

Installation 💾

Easy peazy, just $ npm install --save async-af, right?

⚠️ Not so fast; there's actually several ways to include AsyncAF in your project/production site from easy to more complex:

Easy 👍
🔹 npm: $ npm install --save async-af

🔸 yarn: $ yarn add async-af

🔹 bower: async-af is no longer published to bower. To continue using it with bower, look into <a href=https://github.com/mjeanroy/bower-npm-resolver>bower-npm-resolver.

🔸 cdn: See the table for which script tag to use:

modebrowsersscript tag
developmentmodern (ES6+)<script src="https://unpkg.com/async-af/index.js"></script>
developmentlegacy (ES5+)<script src="https://unpkg.com/async-af/legacy/index.js"></script>
productionmodern (ES6+)<script src="https://unpkg.com/async-af/min.js"></script>
productionlegacy (ES5+)<script src="https://unpkg.com/async-af/legacy/min.js"></script>


More Complex 🤔

🔹 scoped packages:

Instead of pulling in the entire AsyncAF library, you can install smaller standalone packages for each of the AsyncAF methods you intend to use; for example, @async-af/map and/or @async-af/filter; see further instructions in the documentation for AsyncAfWrapper and AsyncAfWrapper.use.

🔸 scoped packages + babel-plugin-transform-imports:

If you use more than a few AsyncAF scoped packages in a file, you might start to build a wall of import statements to pull them all in. If this is an eyesore for you, look into babel-plugin-transform-imports and condense that ugly wall down to a single import statement! See Wrapper/Use: Too Many 🤬 Imports!? for a tutorial.

🔹 es modules:

AsyncAF as well as its scoped packages are also published as es modules. This gives an opportunity to conditionally load async-af with ES6+ features in modern browsers and async-af with ES5-compatible features in legacy browsers.

Using the cdn scripts as an example:


<script type="module" src="https://unpkg.com/async-af/esm/index.js"></script> <script nomodule src="https://unpkg.com/async-af/legacy/index.js"></script>

or minimized for production:


<script type="module" src="https://unpkg.com/async-af/esm/min.js"></script> <script nomodule src="https://unpkg.com/async-af/legacy/min.js"></script>

The script with <script type="module"> will load in any browser capable of loading es modules, while the script with <script nomodule> will act as a fallback for legacy browsers.

See here and here for further reading on this strategy.


License

AsyncAF is licensed under the MIT License, so you can pretty much use it however you want

(but click here or here to get into specifics).

FOSSA Status

Keywords

FAQs

Package last updated on 18 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc