Skip to content

sampathsris/ascii-fullwidth-halfwidth-convert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ascii-fullwidth-halfwidth-convert

Coverts ASCII characters in the range \u0021-\u007E to their equivalent full-width form (\uFF01-\uFF5E), and vice versa. Also converts between the ASCII space \u0020 and Ideographic Space \u3000.

Install

$ npm install ascii-fullwidth-halfwidth-convert

Usage

const AFHConvert = require('ascii-fullwidth-halfwidth-convert');
const converter = new AFHConvert();
const str = 'THE quick, BROWN\u3000fox.';

converter.toFullWidth(str);
//=> 'THE quick, BROWN fox.'

converter.toHalfWidth(str);
//=> 'THE quick, BROWN fox.'

License

MIT © Sampath Sitinamaluwa

About

Convert ASCII to their full-width form and back.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published