andyhu
V2EX  ›  Node.js

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

  •  
  •   andyhu · Aug 27, 2014 · 9395 views
    This topic created in 4288 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   ·   2699 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 36ms · UTC 11:05 · PVG 19:05 · LAX 04:05 · JFK 07:05
    ♥ Do have faith in what you're doing.