File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ Output:
2626
2727## Features
2828* [ ✓] Easy to use
29+ * [ ✓] Replace tokens in json file
30+ * [ ✓] Change your Start and End string of tokens
2931
3032## Fast setup
31331 . Run ` npm install json-token-replace --save `
Original file line number Diff line number Diff line change 77 * @license : This code and contributions have 'GNU General Public License v3'
88 * @version : 1.0.0
99 * @changelog : 1.0.0 initial release
10- * 1.1.0 start and end tokens string
10+ * 1.1.0 start and end tokens string
1111 *
1212 */
1313class Utils {
@@ -18,7 +18,7 @@ class Utils {
1818 replace ( json_tokens , json_input , start = "{{" , end = "}}" ) {
1919 let json_string = JSON . stringify ( json_input ) ;
2020 for ( var key in json_tokens ) {
21- let regex = new RegExp ( start + key + end , "g" ) ;
21+ let regex = new RegExp ( start + key + end , "g" ) ;
2222 json_string = json_string . replace ( regex , json_tokens [ key ] ) ;
2323 }
2424
You can’t perform that action at this time.
0 commit comments