@betadv/placeholders
v1.0.0
Published
Simple Placeholder Manager for JSON Files.
Downloads
3
Maintainers
Readme
JSON Placeholders
Easy PlaceHolder Manager (Json Files Only) for Your APPs.
HOW TO USE:
// REQUIRE THE PACKAGE
const Place = require("@betadv/placeholders");
// SETUP PLACEHOLDERS
let edt = new Place.Holder("./path-to-file.json", { /* PLACEHOLDERS */ user: "BetaDv", isDev: true /* MAKES IT A STRING */ });
console.log(edt.load() /* OBJECT ENTRY HERE or LEAVE EMPTY TO SHOW WHOLE OBJECT */);
// WILL REPLACE IN ALL THE ENTRIES IN THE OBJECT THE PLACEHOLDER VALUE
// SPECIFIED FILE
{
"message": "{{ user }} is a Developer? It's {{ isDev }}!"
}
// EXPECTED OUTPUT:
/*
BetaDv is a Developer? It's true!
*/
INFO: To Show a Placeholder in the JSON Message: {{ placeHolderName }} - IS CASE SENSITIVE
BUILT IN:
| NAME | ARGUMENTS | | --- | --- | | new Holder | ("./pathToFile.json", { placeHolderName: value, etc... }) | | load | () |
INFO: Supports Infinite Placeholders...
IMPORTANT: Placeholders Are Being Set in The Order you Put them In the Argument (OBJECT).
INFO: For Support Join My Discord Server.