Skip to content

Commit 35c20b6

Browse files
committed
added readme and updated package.json
1 parent 0dc7d42 commit 35c20b6

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# make-string
2+
3+
make-string converts all data types to string as JSON.toString.
4+
5+
## Installation ##
6+
7+
``` bash
8+
npm install make-string
9+
```
10+
## Usage ##
11+
12+
```js
13+
const makeString = require('make-string');
14+
makeString(25); // '25'
15+
```
16+
## Why? ##
17+
I need to convert the object to string in configurable way like removing curly braces, with single quote, etc. So I created this module. If you face any issues with this module, Free feel to create the issues https://github.com/ajay2507/make-string/issues.
18+
19+
## How to use ##
20+
21+
```js
22+
const makeString = require('make-string');
23+
makeString("make-string"); // "make-string"
24+
makeString("make-string", {quotes: 'single'}); // 'make-string'
25+
makeString({package:"make-string"}); // '{"package":"make-string"}'
26+
makeString({package:"make-string"}, {braces: 'false'}); // '"package":"make-string"'
27+
makeString({package:"make-string"}, {assignment: '='}); // '{"package"="make-string"}'
28+
```

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "make-string",
33
"version": "1.0.0",
4-
"description": "",
4+
"description": "convert all data types to string in configurable way",
55
"main": "index.js",
66
"scripts": {
77
"test": "mocha test.js"
@@ -11,5 +11,12 @@
1111
"devDependencies": {
1212
"chai": "^4.2.0",
1313
"mocha": "^5.2.0"
14-
}
14+
},
15+
"keywords": [
16+
"string",
17+
"convert",
18+
"toString",
19+
"JSON.toString",
20+
"makeString"
21+
]
1522
}

0 commit comments

Comments
 (0)