Skip to content

Nodejs Special Character module, base on UTF-8 Encoding

License

Notifications You must be signed in to change notification settings

purwokertodev/special-char

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Special Character

Build Status

Why ?

Sometimes you need to add special character to your string variable.... ¼ µ ¿ Ȝ Φ , hope can fix your problem

Usage

  • Install using NPM
$ npm install special-char
  • Very simple, just add to your code
const SC = require('special-char');

let str1 = `Its so cold, i think 10${SC.DEGREE_SIGN} now..`;
console.log(str1);
  • you'll see the following result
Its so cold, i think 10° now..
  • json
const SC = require('special-char');

let json = {
  "id": "001",
  "name": "box a",
  "price": `${SC.POUND_SIGN} 10`
};

console.log(JSON.stringify(json));
  • you'll see the following json result
{
  "id":"001",
  "name":"box a",
  "price":"£ 10"
}

Task List

  • Basic testing
  • Basic example
  • Travis CI build
  • Code finish
  • Full Documentation

How to Contribute

  • Fork first
  • Clone to your local machine
$ git clone https://github.com/<your-github-username>/special-char
  • Install dependencies
$ npm install
  • Create a new branch
$ git checkout -b feature/your-feature-branch
  • Run test
$ npm test
  • Push to your repository
$ git push -u origin feature/your-feature-branch
  • Hit the Pull Request

Releases

No releases published

Packages