ZehaiZhang
V2EX  ›  问与答

有什么特别小但很好用的 npm 包

  •  
  •   ZehaiZhang · Jul 27, 2018 via Android · 2215 views
    This topic created in 3027 days ago, the information mentioned may be changed or developed.

    最近想写 npm,有什么成品可以参考学习么?

    4 replies  •  2018-07-27 13:38:17 +08:00
    Mutoo
    Mutoo
    Jul 27, 2018
    1
    前阵子没事做的时候,升级了几年前写的一个包:js_mt_rand

    用 es6 重写,用 jasmine 加了单元测试,用 rollup 打包...

    改之前
    https://github.com/mutoo/js_mt_rand/tree/1.0.0

    改之后
    https://github.com/mutoo/js_mt_rand/tree/2.0.1

    改完确实像个包了。
    Mutoo
    Mutoo
    Jul 27, 2018
    2
    最新应该是 2.1.0,忘了打 tag 了,反正只是自己用用而已。

    https://www.npmjs.com/package/js_mt_rand
    noe132
    noe132
    Jul 27, 2018
    3
    不是应该学些 isOdd 么~拥有完善的 readme,测试用例
    https://www.npmjs.com/package/is-odd
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   902 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:02 · PVG 05:02 · LAX 13:02 · JFK 16:02
    ♥ Do have faith in what you're doing.