V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sox
V2EX  ›  Node.js

Node.js 模块风格指南

  •  1
     
  •   sox · 2016-01-29 13:05:35 +08:00 · 3364 次点击
    这是一个创建于 3015 天前的主题,其中的信息可能已经有所发展或是发生改变。
    11 条回复    2016-01-29 22:53:19 +08:00
    adoyle
        1
    adoyle  
       2016-01-29 13:25:36 +08:00
    哇哦,博客很酷哦
    magicdawn
        2
    magicdawn  
       2016-01-29 13:44:12 +08:00
    superagent promisify using bluebird

    const request = require('superagent');
    const Request = request.Request;
    Request.prototype.endAsync = Promise.promisify(Request.prototype.end);
    sox
        3
    sox  
    OP
       2016-01-29 13:52:57 +08:00
    @magicdawn 不如直接 fetch 233
    libook
        4
    libook  
       2016-01-29 13:56:56 +08:00
    赞一个
    magicdawn
        5
    magicdawn  
       2016-01-29 14:27:09 +08:00
    @sox 看你一会 superagent, 一会 node-fetch ... 不太好 ...
    int64ago
        6
    int64ago  
       2016-01-29 14:45:41 +08:00
    还是弄个域名吧,看你 GitHub 已经很牛了
    libook
        7
    libook  
       2016-01-29 15:00:16 +08:00
    加个 Disqus 呗~
    sox
        8
    sox  
    OP
       2016-01-29 16:13:05 +08:00
    @magicdawn 这不是演示 callback 和 Promise 吗。。
    magicdawn
        9
    magicdawn  
       2016-01-29 16:41:57 +08:00
    @sox !!!
    sox
        10
    sox  
    OP
       2016-01-29 22:52:54 +08:00
    sox
        11
    sox  
    OP
       2016-01-29 22:53:19 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2303 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 12:18 · PVG 20:18 · LAX 05:18 · JFK 08:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.