Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

modli-nedb

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

modli-nedb

Modli adapter for NeDB

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
2
Weekly downloads
 
Created
Source

wercker status Code Climate Test Coverage

Modli - NeDB Adapter

This module provides adapter for the NeDB datasource for integration with Modli.

Installation

npm install modli-nedb --save

Usage

import { model, adapter, Joi, use } from 'modli';
import { nedb } from 'modli-nedb';

// Create a model
model.add({
  name: 'testModel',
  version: 1,
  schema: {
    /* ...schema properties... */
  }
});

// Add adapter using NeDB
model.add({
  name: 'testNEDB',
  source: nedb
  config: {
    inMemoryOnly: true
  }
});

const testModli = use('testModel', 'testNEDB');

Makefile and Scripts

A Makefile is included for managing build and install tasks. The commands are then referenced in the package.json scripts if that is the preferred task method:

  • all (default) will run all build tasks
  • start will run the main script
  • clean will remove the /node_modules directories
  • build will transpile ES2015 code in /src to /build
  • test will run all spec files in /test/src
  • test-cover will run code coverage on all tests
  • lint will lint all files in /src

Testing

Running make test will run the full test suite. Since adapters require a data source if one is not configured the tests will fail. To counter this tests are able to be broken up.

Test Inidividual File

An individual spec can be run by specifying the FILE. This is convenient when working on an individual adapter.

make test FILE=some.spec.js

The FILE is relative to the test/src/ directory.

Deploys

For deploying releases, the deploy TAG={VERSION} can be used where VERSION can be:

<newversion> | major | minor | patch | premajor

Both make {COMMAND} and npm run {COMMAND} work for any of the above commands.

License

Modli-NeDB is licensed under the MIT license. Please see LICENSE.txt for full details.

Credits

Modli-NeDB was designed and created at TechnologyAdvice.

Keywords

FAQs

Package last updated on 02 Mar 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc