andyhu
V2EX  ›  Node.js

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

  •  
  •   andyhu · Aug 27, 2014 · 9403 views
    This topic created in 4291 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   ·   3085 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 14:11 · PVG 22:11 · LAX 07:11 · JFK 10:11
    ♥ Do have faith in what you're doing.