New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

eternal-js

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eternal-js

A JSON Manipulation Tool for In-File Databases

latest
Source
npmnpm
Version
1.0.7
Version published
Maintainers
1
Created
Source

Eternal.js: The ideal tool for JSON.

Eternal.js makes it easy to do CRUD operations on JSON files. Just make the data folder, and use the functions. It is as simple as that.

Example:

{  
    name: `Smith`, 
    age: 59, 
    job: `Politician`, 
}

Setup Guide

  • Install the Eternal Tool
     npm install eternal-js
  • Create a data folder. Eternal-js detects a procfile to store your json files. Name your folder "data".

  • Create your First Eternal JSON data

   eternal.create('my_database', { 
        name: `Doge`, 
        age: 25, 
        grade: 2, 
   }, () => console.log('Data Printed!'));
  • Want some more commands? Here is some syntax for remaining functions!
//returns the data as it is from the json file. 
   let data = eternal.read('my_database'); 
   console.log(data); 
//
// Want to update your data? Here is some syntax!
   let data = eternal.read('my_database'); 
         data.name = `George` 
         data.age = 49
         data.grade = 9
   eternal.update('my_database', data); 
   //deleting your data is a breeze with the delete() method 
      eternal.delete('my_database', () => { 
           console.log('Data Deleted!')
      })
  • I will update this project somewhat regularly. In the meantime, spread word about this npm package, and KEEP USING IT! IF you find it useful that is :).

  • Created by Sidharth Ponram. Check out my profile on GitHub! @sidharthponram916

Keywords

json

FAQs

Package last updated on 07 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts