andyhu
V2EX  ›  Node.js

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

  •  
  •   andyhu · Aug 27, 2014 · 9821 views
    This topic created in 4458 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
    YAFEIML
    Aug 27, 2014
    1
    这个屌啊
    rekey
    rekey
    Aug 28, 2014
    2
    赞一个,很有用啊。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   941 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 20:03 · PVG 04:03 · LAX 12:03 · JFK 15:03
    ♥ Do have faith in what you're doing.