Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/purwokertodev/special-char
Nodejs Special Character module, base on UTF-8 Encoding
https://github.com/purwokertodev/special-char
nodejs nodejs-modules special-characters utf-8
Last synced: about 2 months ago
JSON representation
Nodejs Special Character module, base on UTF-8 Encoding
- Host: GitHub
- URL: https://github.com/purwokertodev/special-char
- Owner: purwokertodev
- License: mit
- Created: 2017-04-27T04:31:19.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T07:36:45.000Z (over 7 years ago)
- Last Synced: 2024-11-13T13:55:19.654Z (about 2 months ago)
- Topics: nodejs, nodejs-modules, special-characters, utf-8
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Special Character
[![Build Status](https://travis-ci.org/wuriyanto48/special-char.svg?branch=master)](https://travis-ci.org/wuriyanto48/special-char)
# Why ?
Sometimes you need to add **special character** to your string variable....
**¼ µ ¿ Ȝ Φ** , hope can fix your problem# Usage
- Install using NPM
```shell
$ npm install special-char
```- Very simple, just add to your code
```javascript
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
```javascript
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
- [x] Basic testing
- [x] Basic example
- [x] Travis CI build
- [ ] Code finish
- [ ] Full Documentation# How to Contribute
- Fork first
- Clone to your local machine
```shell
$ git clone https://github.com//special-char
```- Install dependencies
```shell
$ npm install
```- Create a new branch
```shell
$ git checkout -b feature/your-feature-branch
```- Run test
```shell
$ npm test
```- Push to your repository
```shell
$ git push -u origin feature/your-feature-branch
```- Hit the Pull Request