html5.db

1.0.1 • Public • Published

Html5.DB

A simple database that uses html as the storage format.

Installation

npm install html5.db

Usage

const HTML5DB = require('html5.db');

// Create a new html database
const htmlDB = new HTML5DB(__dirname+'/db1.html');

// Set key/value pair
htmlDB.set('foo', 'boo') // -> true

// Get length (or size)
htmlDB.length // -> 1
htmlDB.size // -> 1

// Get key
htmlDB.get('foo') // -> 'boo'

// Has key
htmlDB.has('foo') // -> true

// Delete key
htmlDB.delete('foo') // -> true

// Get entries
htmlDB.entries() // -> [{"key": "foo", "value": "boo"}]

// Get keys
htmlDB.keys() // -> ["foo"]

// Get values
htmlDB.values() // -> ["boo"]

// Clear all entries
htmlDB.clear() // -> true

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i html5.db

      Weekly Downloads

      0

      Version

      1.0.1

      License

      MIT

      Unpacked Size

      3.1 kB

      Total Files

      3

      Last publish

      Collaborators

      • danplayz0