CSSPod
  • Home
  • Contact
  • 求贤

Node.js

A collection of 3 posts

Node.js

Promise 化回调式函数

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

  • minwe
    minwe
2 min read
Node.js

Node.js 基础设计模式

设计模式是对普遍存在问题提出的常规的、可复用的解决方案。 单例 单例模式确保一个类只有一个实例。 因为 require 机制,Node.js 中创建单例很方便。 //area.js var PI = Math.PI; function circle (radius) {...

  • minwe
    minwe
3 min read
JavaScript

2014 年 JavaScript 回顾

8月底,Yahoo 宣布 YUI 终止开发,2005年 Yahoo 内部使用,2006 年 2 月 13 日对外开放的第一代 UI 库 8 年之后陨落。 基于 Node.js Stream 的构建工具 Gulp 取代 Grunt。 Node.js 在年初经历了项目负责人变更的巨变,...

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