All Projects → youngjuning → Wx Promise Pro

youngjuning / Wx Promise Pro

Licence: mit
✨强大、优雅的微信小程序异步库🚀

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Wx Promise Pro

Breeze
Javascript async flow control manager
Stars: ✭ 38 (-95.01%)
Mutual labels:  async, promise, await
P Iteration
Utilities that make array iteration easy when using async/await or Promises
Stars: ✭ 337 (-55.77%)
Mutual labels:  async, promise, await
Awaitkit
The ES8 Async/Await control flow for Swift
Stars: ✭ 709 (-6.96%)
Mutual labels:  async, promise, await
Ws Promise Client
PROJECT MOVED: https://github.com/kdex/ws-promise
Stars: ✭ 6 (-99.21%)
Mutual labels:  async, promise, await
Emacs Async Await
Async/Await for Emacs
Stars: ✭ 47 (-93.83%)
Mutual labels:  async, promise, await
Await Of
await wrapper for easier errors handling without try-catch
Stars: ✭ 240 (-68.5%)
Mutual labels:  async, promise, await
P Map
Map over promises concurrently
Stars: ✭ 639 (-16.14%)
Mutual labels:  async, promise, await
Async Sema
Semaphore using `async` and `await`
Stars: ✭ 326 (-57.22%)
Mutual labels:  async, await
Promise Fun
Promise packages, patterns, chat, and tutorials
Stars: ✭ 3,779 (+395.93%)
Mutual labels:  async, promise
Fun Task
Abstraction for managing asynchronous code in JS
Stars: ✭ 363 (-52.36%)
Mutual labels:  async, promise
Vue Skeleton Mvp
VueJs, Vuetify, Vue Router and Vuex skeleton MVP written on JavaScript using async/await built to work with API REST skeleton: https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton
Stars: ✭ 406 (-46.72%)
Mutual labels:  async, await
Aigle
🦅 Aigle is an ideal promise library which is faster and more efficient than other libraries. It is a production-ready library that implements the Promise A+ standard.
Stars: ✭ 318 (-58.27%)
Mutual labels:  async, promise
Async Techniques Python Course
Async Techniques and Examples in Python Course
Stars: ✭ 314 (-58.79%)
Mutual labels:  async, await
Creed
Sophisticated and functionally-minded async with advanced features: coroutines, promises, ES2015 iterables, fantasy-land
Stars: ✭ 265 (-65.22%)
Mutual labels:  async, promise
Asyncenumerable
Defines IAsyncEnumerable, IAsyncEnumerator, ForEachAsync(), ParallelForEachAsync(), and other useful stuff to use with async-await
Stars: ✭ 367 (-51.84%)
Mutual labels:  async, await
React Hooks Async
React custom hooks for async functions with abortability and composability
Stars: ✭ 459 (-39.76%)
Mutual labels:  async, promise
Future
Streamlined Future<Value, Error> implementation
Stars: ✭ 291 (-61.81%)
Mutual labels:  async, promise
Sqlx
🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, SQLite, and MSSQL.
Stars: ✭ 5,039 (+561.29%)
Mutual labels:  async, await
Micro Router
🚉 A tiny and functional router for Zeit's Micro
Stars: ✭ 621 (-18.5%)
Mutual labels:  async, await
Posterus
Composable async primitives with cancelation, control over scheduling, and coroutines. Superior replacement for JS Promises.
Stars: ✭ 536 (-29.66%)
Mutual labels:  async, promise

wx-promise-pro

All Contributors

✨强大、优雅的微信小程序异步库🚀

npm npm Financial Contributors on Open Collective

NPM

优势

  • 方便集成:一处引用,处处使用
  • 把微信小程序所有异步 API promise 化并挂在到wx.pro 对象下
  • 支持 ES2018 finally 特性
  • 支持 TypeScript 开发

安装

你也可以直接把 dist 目录下的 wx-promise-pro.js 拷贝到项目里使用

$ npm i wx-promise-pro -S
# or
$ yarn add wx-promise-pro

初始化

import { promisifyAll, promisify } from 'wx-promise-pro'
// promisify all wx‘s api
promisifyAll()
// promisify single api
promisify(wx.getSystemInfo)().then(console.log)

示例代码

wx.pro.showLoading({
  title: '加载中',
  mask: true
})
wx.pro.request({
  url: 'https://cnodejs.org/api/v1/topics',
  data: {},
  method: 'GET',
  header: {'content-type': 'application/json'}
}).then(res => {
  console.log(res)
}).catch(err => {
  console.log(err)
}).finally(() => {
  wx.pro.hideLoading()
})

贡献者 ✨

感谢如下贡献者的贡献 (emoji key):


Shenshun Weng

💻

kala888

💻

Yiming Li

🐛
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].