
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
datarecorder
Advanced tools
[](https://github.com/shiveshnavin/datarecorder/actions/workflows/main.yml)
A simple library to record data in chunks.
Database connection is required for using datarecorder. Refer to MultiDbOrm for more details
Supported databases:
Run in your NodeJS root
npm install -s datarecorder
Initialize with chunk size and multidb database connection.
MultiDbORM database connection. If db is not passed, a local file based sqlite db is used.Example using SQLite
let recorder = require('datarecorder')
let chunkSize = 100;
let messageRecorder = recorder('myMessageRecorderID')
messageRecorder.init(chunkSize)
Example using firestore:
let recorder = require('datarecorder')
let chunkSize = 100;
const { MultiDbORM, FireStoreDB, MongoDB, SQLiteDB } = require("multi-db-orm");
let db = new FireStoreDB('./path/to/serviceaccount.json');
let messageRecorder = recorder('myMessageRecorderID',db)
messageRecorder.init(chunkSize)
After every chunkSize records the data will be flushed to database automatically. The objects recorded can be heterogenous.
messageRecorder.record({
location:"Home",
message:"An elephant entered the wardrobe"
})
messageRecorder.record({
location:"Office",
message:"The wabbit burnt the closet."
})
let urgentMessage = {
imageUrl : 'http://example.com/elephant.png'
}
messageRecorder.record(urgentMessage)
Once you are done with recording the data or want to flush the data manually , you can explicitly flush using.
messageRecorder.flush()
Reads the saved records in ascending order of time and returns an array.
let messages = await messageRecorder.read()
console.log('Read', messages.length, 'messages')
This will remove all the records for messageRecorder
let messages = await messageRecorder.delete()
FAQs
[](https://github.com/shiveshnavin/datarecorder/actions/workflows/main.yml)
We found that datarecorder demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.