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

data-engine

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-engine

Data engine is small data management lib for some sort and filter.

  • 3.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

DATA-ENGINE

Simple data engine, to provide sort and filter. It can work with custom dataset.

Installation

npm install --save data-engine

Example Usage

import DataEngine, { Filter, Sort, FilterValue } from 'data-engine';

var Filter = require('data-engine');

Constructor

    const engine = new DataEngine();
    const engine2 = new DataEngine({
        data, primaryKey, sortFunction, direction,
    });

Data

    engine.setData(data);
    engine.Data = data;
    const data = engine.Data;
    const data = engine.getData();

Filters

    const filteredData = engine.updateFilters(filter, filter2, filter3);
    const filteredData = engine.removeFilters(filter, filter2, filter3);
    const filteredData = engine.addFilter(name, value, type);
    const filteredData = engine.clearFilters();

Sort

    const sorted = engine.sortBy('Column name');
    const sorted = engine.setSortFunction((a, b) => (a > b? 1 : -1));
    const sorted = engine.setPrimaryKey('Column name');
    const sorted = engine.removePrimaryKey();
    const sorted = engine.setDefaultSort();

Keywords

FAQs

Package last updated on 16 Mar 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

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