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

taffydb

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

taffydb

TaffyDB is an opensouce library that brings database features into your JavaScript applications.

  • 2.7.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
478K
decreased by-19.87%
Maintainers
4
Weekly downloads
 
Created

What is taffydb?

TaffyDB is a lightweight JavaScript library that provides a simple and efficient way to manage and query in-memory databases. It is particularly useful for handling JSON data and performing complex queries, updates, and deletions on that data.

What are taffydb's main functionalities?

Creating a Database

This feature allows you to create a new TaffyDB database from an array of JSON objects. The database can then be queried and manipulated.

const TAFFY = require('taffy');
const db = TAFFY([ { id: 1, name: 'John', age: 30 }, { id: 2, name: 'Jane', age: 25 } ]);

Querying Data

This feature allows you to query the database using a variety of conditions. In this example, it retrieves all records where the age is less than 30.

const result = db({ age: { lt: 30 } }).get();
console.log(result);

Updating Data

This feature allows you to update records in the database. In this example, it updates the age of the record with id 1 to 31.

db({ id: 1 }).update({ age: 31 });
const updatedRecord = db({ id: 1 }).first();
console.log(updatedRecord);

Deleting Data

This feature allows you to delete records from the database. In this example, it removes the record with id 2.

db({ id: 2 }).remove();
const remainingRecords = db().get();
console.log(remainingRecords);

Other packages similar to taffydb

Keywords

FAQs

Package last updated on 18 Sep 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