This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 1,000,000+ packages pre-installed, including
ascii-fullwidth-halfwidth-convert with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Coverts ASCII characters in the range
\u007E to their equivalent full-width form (
\uFF5E), and vice versa. Also converts between the ASCII space
\u0020 and Ideographic Space
$ npm install ascii-fullwidth-halfwidth-convert
const AFHConvert = require('ascii-fullwidth-halfwidth-convert'); const converter = new AFHConvert(); const str = 'THE ｑｕｉｃｋ， ＢＲＯＷＮ\u3000fox.'; converter.toFullWidth(str); //=> 'ＴＨＥ ｑｕｉｃｋ， ＢＲＯＷＮ ｆｏｘ．' converter.toHalfWidth(str); //=> 'THE quick, BROWN fox.'
MIT © Sampath Sitinamaluwa