CSSPod
  • Home
  • Contact
  • 求贤

Promise

A collection of 2 posts

Node.js

Promise 化回调式函数

Node.js 8 提供了新的工具函数:util.promisify,用于把形如 (err, value) => ... 的回调式函数转换为 Promise 版本。 基本使用 const util = require('util'); const fs = require('...

  • minwe
    minwe
2 min read
async

基于 Promises 的表单验证

Promises 理念已经改变了编写异步 JavaScript 的方式。近一年来,许多框架都集成了 Promise 模式,让编写、阅读、维护异步代码更加容易。比如,jQuery 添加了  $.Deferred() API, NodeJS 有服务器端和客户端都能用的 Q 和 jspro...

  • minwe
    minwe
8 min read
CSSPod © 2023
Latest Posts Ghost