Sometimes you need to add special character to your string variable.... ¼ µ ¿ Ȝ Φ , hope can fix your problem
- 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"
}
- Basic testing
- Basic example
- Travis CI build
- Code finish
- Full Documentation
- 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