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

firestorm-db

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firestorm-db - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

31

index.js

@@ -18,2 +18,7 @@ const { default: axios } = require("axios")

/**
* @typedef {Object} SelectOption
* @property {Array<String>} fields Chosen fields to eventually return
*/
let _address = undefined

@@ -201,2 +206,28 @@ let _token = undefined

/**
* Upgraded read raw with field selection
* @param {SelectOption} selectOption Select options
*/
select(selectOption) {
if(!selectOption) selectOption = {}
return new Promise((resolve, reject) => {
this.__extract_data(axios.get(readAddress(), {
data: {
'collection': this.collectionName,
'command': 'select',
'select': selectOption
}
}))
.then(data => {
Object.keys(data).forEach(key => {
data[key][ID_FIELD_NAME] = key
this.addMethods(data[key])
})
resolve(data)
})
.catch(reject)
})
}
/**
*

@@ -203,0 +234,0 @@ * @param {String} command The write command you want

2

package.json
{
"name": "firestorm-db",
"version": "1.4.0",
"version": "1.5.0",
"description": "Self hosted Firestore-like database with API endpoints based on micro bulk operations",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -85,2 +85,3 @@ <div align="center">

| searchKeys(keys) | keys: ``String[] \| Number[]`` | Searches collections with given keys and returns matching results |
| select(selectOption) | selectOption: ``{ field: String[] }`` | Improved read_raw with field selection |

@@ -87,0 +88,0 @@ Search method can take one or more options to filter entries in a collection. A search option studies a ``field`` with a ``criteria`` and compares it to a ``value``.

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