Exists

you can check exists property via file.exists function

const json = require("jsonbyte");


const file = new json("./file.json")

const exists = file.exists("username");

if (exists) return console.log("username is exists"); // reutrn if exists
else return console.log("username is not exists"); // return if not exists

Last updated