npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

unicodedigits

v0.1.2

Published

Translate Unicode digits

Downloads

452

Readme

unicodedigits

nodejs module for translating unicode digits

Install

$ npm install unicodedigits --save

Intro & Examples

Simple example

var nd = require('unicodedigits');

var digits = '0 1 2 3 4 5 6 7 8 9';

nd.classes.forEach(
  function ( name ) {
    console.log("%s : %s", nd.replaceDigits( digits, name ), name );
  }
);
var nd = require('unicodedigits');

var list = [
  "0123456789",
  "٠١٢٣٤٥٦٧٨٩",
  "۰۱۲۳۴۵۶۷۸۹",
  "߀߁߂߃߄߅߆߇߈߉",
  "०१२३४५६७८९",
  "০১২৩৪৫৬৭৮৯",
  "੦੧੨੩੪੫੬੭੮੯",
  "૦૧૨૩૪૫૬૭૮૯",
  "୦୧୨୩୪୫୬୭୮୯",
  "௦௧௨௩௪௫௬௭௮௯"
];

list.forEach(
  function (item) {
    console.log( nd.replaceDigits( item, 'ASCII' ) );
  }
);

Supported Unicode classes

  1. 000030 ASCII
  2. 000660 ARABIC-INDIC
  3. 0006F0 EXTENDED ARABIC-INDIC
  4. 0007C0 NKO
  5. 000966 DEVANAGARI
  6. 0009E6 BENGALI
  7. 000A66 GURMUKHI
  8. 000AE6 GUJARATI
  9. 000B66 ORIYA
  10. 000BE6 TAMIL
  11. 000C66 TELUGU
  12. 000CE6 KANNADA
  13. 000D66 MALAYALAM
  14. 000DE6 SINHALA LITH
  15. 000E50 THAI
  16. 000ED0 LAO
  17. 000F20 TIBETAN
  18. 001040 MYANMAR
  19. 001090 MYANMAR SHAN
  20. 0017E0 KHMER
  21. 001810 MONGOLIAN
  22. 001946 LIMBU
  23. 0019D0 NEW TAI LUE
  24. 001A80 TAI THAM HORA
  25. 001A90 TAI THAM THAM
  26. 001B50 BALINESE
  27. 001BB0 SUNDANESE
  28. 001C40 LEPCHA
  29. 001C50 OL CHIKI
  30. 00A620 VAI
  31. 00A8D0 SAURASHTRA
  32. 00A900 KAYAH LI
  33. 00A9D0 JAVANESE
  34. 00A9F0 MYANMAR TAI LAING
  35. 00AA50 CHAM
  36. 00ABF0 MEETEI MAYEK
  37. 00FF10 FULLWIDTH
  38. 0104A0 OSMANYA
  39. 011066 BRAHMI
  40. 0110F0 SORA SOMPENG
  41. 011136 CHAKMA
  42. 0111D0 SHARADA
  43. 0112F0 KHUDAWADI
  44. 011450 NEWA
  45. 0114D0 TIRHUTA
  46. 011650 MODI
  47. 0116C0 TAKRI
  48. 011730 AHOM
  49. 0118E0 WARANG CITI
  50. 011C50 BHAIKSUKI
  51. 016A60 MRO
  52. 016B50 PAHAWH HMONG
  53. 01D7CE MATHEMATICAL BOLD
  54. 01D7D8 MATHEMATICAL DOUBLE-STRUCK
  55. 01D7E2 MATHEMATICAL SANS-SERIF
  56. 01D7EC MATHEMATICAL SANS-SERIF BOLD
  57. 01D7F6 MATHEMATICAL MONOSPACE
  58. 01E950 ADLAM

Support

If at all possible when you open an issue please provide

  • version of node
  • version of postgres
  • smallest possible snippet of code to reproduce the problem

History

2012-August-29 user1585033 asked a question on Stackoverflow and I answered with both a limited function to solve the problem, and with a general function.

2017-May-05 Flavio Corpa found the function on Stackoverflow and suggested that I should publish that as a module for node.js. I thought that was a good idea, so I did.

License

MIT