Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ![Async Logo](https://raw.githubusercontent.com/caolan/async/master/logo/async-logo_readme.jpg)
  2. [![Build Status via Travis CI](https://travis-ci.org/caolan/async.svg?branch=master)](https://travis-ci.org/caolan/async)
  3. [![Build Status via Azure Pipelines](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master)
  4. [![NPM version](https://img.shields.io/npm/v/async.svg)](https://www.npmjs.com/package/async)
  5. [![Coverage Status](https://coveralls.io/repos/caolan/async/badge.svg?branch=master)](https://coveralls.io/r/caolan/async?branch=master)
  6. [![Join the chat at https://gitter.im/caolan/async](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/caolan/async?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
  7. [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/async/badge?style=rounded)](https://www.jsdelivr.com/package/npm/async)
  8. <!--
  9. |Linux|Windows|MacOS|
  10. |-|-|-|
  11. |[![Linux Build Status](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master&jobName=Linux&configuration=Linux%20node_10_x)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master) | [![Windows Build Status](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master&jobName=Windows&configuration=Windows%20node_10_x)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master) | [![MacOS Build Status](https://dev.azure.com/caolanmcmahon/async/_apis/build/status/caolan.async?branchName=master&jobName=OSX&configuration=OSX%20node_10_x)](https://dev.azure.com/caolanmcmahon/async/_build/latest?definitionId=1&branchName=master)| -->
  12. Async is a utility module which provides straight-forward, powerful functions for working with [asynchronous JavaScript](http://caolan.github.io/async/v3/global.html). Although originally designed for use with [Node.js](https://nodejs.org/) and installable via `npm i async`, it can also be used directly in the browser. A ESM/MJS version is included in the main `async` package that should automatically be used with compatible bundlers such as Webpack and Rollup.
  13. A pure ESM version of Async is available as [`async-es`](https://www.npmjs.com/package/async-es).
  14. For Documentation, visit <https://caolan.github.io/async/>
  15. *For Async v1.5.x documentation, go [HERE](https://github.com/caolan/async/blob/v1.5.2/README.md)*
  16. ```javascript
  17. // for use with Node-style callbacks...
  18. var async = require("async");
  19. var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"};
  20. var configs = {};
  21. async.forEachOf(obj, (value, key, callback) => {
  22. fs.readFile(__dirname + value, "utf8", (err, data) => {
  23. if (err) return callback(err);
  24. try {
  25. configs[key] = JSON.parse(data);
  26. } catch (e) {
  27. return callback(e);
  28. }
  29. callback();
  30. });
  31. }, err => {
  32. if (err) console.error(err.message);
  33. // configs is now a map of JSON data
  34. doSomethingWith(configs);
  35. });
  36. ```
  37. ```javascript
  38. var async = require("async");
  39. // ...or ES2017 async functions
  40. async.mapLimit(urls, 5, async function(url) {
  41. const response = await fetch(url)
  42. return response.body
  43. }, (err, results) => {
  44. if (err) throw err
  45. // results is now an array of the response bodies
  46. console.log(results)
  47. })
  48. ```