V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
andyhu
V2EX  ›  Node.js

nodejs 音译(transliteration)模块,支持中文转拼音或生成 slug

  •  
  •   andyhu · Aug 27, 2014 · 9324 views
    This topic created in 4265 days ago, the information mentioned may be changed or developed.
    https://github.com/andyhu/node-transliteration
    用法:
    var transliteration = require('transliteration');
    transliteration.transliterate('你好,世界'); // Ni Hao ,Shi Jie
    transliteration.slugify('你好,世界'); // ni-hao-shi-jie
    transliteration.slugify('你好,世界', {lowercase: false, separator: '_'}); // Ni_Hao_Shi_Jie
    YAFEIML
        1
    YAFEIML  
       Aug 27, 2014
    这个屌啊
    rekey
        2
    rekey  
       Aug 28, 2014
    赞一个,很有用啊。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2572 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:54 · PVG 14:54 · LAX 23:54 · JFK 02:54
    ♥ Do have faith in what you're doing.