1.1.0 • Published 6 years ago

json-token-replace v1.1.0

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
6 years ago

What does it do

Replace the token string {{hello}} in json with value from another json where key is token {"hello":"bye"}

Example:

Json with tokens: { "john":"Alex" }

Json: { "text": "hello {{john}}"}

Output: { "text": "hello Alex"}

Features

  • Easy to use

Fast setup

  1. Run npm install json-token-replace --save
  2. In your code:
const Jtr = require("json-token-replace");
const jtr = new Jtr();

let json_output = jtr.replace(require("./json_with_tokens.json"), require("./json.json"), "{{", "}}");
  1. If work add star :star: at this project :heart:
  2. If you want help me: donate on paypal or become a backer on patreon.

For advanced configuration see INSTALL.md.

GNU GENERAL PUBLIC LICENSE

Copyright (c) 2018 Patryk Rzucidło (PTKDev)

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago