diff --git a/README.md b/README.md index 5f3b976..c159c3e 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,34 @@ import ModFS from "modfs"; const fs = new ModFS({ ADB: "/data/adb", MODULES: "/modules", + NESTED: { + NAME: "Kevin", + PATH: "/user/", + }, + CALL: () => { + return "Nice"; + }, }); -const text = ModFS.format("Nice one, ", { - NAME: "Marvin", - // NAME: undefined -- handle null/undefined values etc +const text = ModFS.format("The family of goes averagely over years and the fun fact is that the last name of the family is . Currently the family has a member count of . The names of family are .", { + human: { + firstName: "Kevin", + lastName: undefined, + }, + avgAge: 100, + familyMembers: ["Granpa", "Papa", "Mama"], }); console.log("ModFS.format:", text); console.log("get:", fs.get("MODULES")); +console.log("get (nested):", fs.get("NESTED")); +console.log("get (nested.PATH):", fs.get("NESTED.PATH")); // returns "/data/adb/user/Kevin" +console.log("get (nested.NAME):", fs.get("NESTED.NAME")); // returns "Kevin" + +console.log("get (function):", fs.get("CALL")); + console.log("formatEntries:", fs.formatEntries()); console.log("entries:", fs.entries); diff --git a/package.json b/package.json index aea4332..c4d5ad2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modfs", - "version": "1.2.1", + "version": "1.2.2", "description": "ModFS is a json format processor and also used in MMRL as the ModFS system", "main": "dist/index.js", "typings": "dist/index.d.ts",