🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

enmap-sqlite

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enmap-sqlite

Enmap-SQLite is a provider for the [Enmap](https://www.npmjs.com/package/enmap) module.

latest
Source
npmnpm
Version
2.0.5
Version published
Weekly downloads
5
-61.54%
Maintainers
1
Weekly downloads
 
Created
Source

Enmap-SQLite

Enmap-SQLite is a provider for the Enmap module.

Installation

To install Enmap-SQLite simply run npm i enmap-sqlite.

Usage

// Load Enmap
const Enmap = require('enmap');
 
// Load EnmapSQLite
const EnmapSQLite = require('enmap-sqlite');
 
// Initialize the provider
const provider = new EnmapSQLite({ name: 'test' });
 
// Initialize the Enmap with the provider instance.
const myColl = new Enmap({ provider: provider });

Shorthand declaration:

const Enmap = require('enmap');
const EnmapSQLite = require('enmap-sqlite');
const myColl = new Enmap({ provider: new EnmapSQLite({ name: 'test' }); });

Options

// Example with all options.
const level = new EnmapSQLite({ 
  name: "test",
  dataDir: './data'
});

name

Defines the name of the table saved in sqlite.

dataDir

Indicates the relative or absolute directory where to hold the sqlite file. If multiple enmap use the same file, a new table is created for each. The filename is always enmap.sqlite.

FAQs

Package last updated on 13 Aug 2018

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