@betadv/placeholders

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i @betadv/placeholders

Weekly Downloads

3

Version

1.0.0

License

ISC

Unpacked Size

3.05 kB

Total Files

5

Last publish

Collaborators

  • betadv