Socket
Socket
Sign inDemoInstall

dbtempo

Package Overview
Dependencies
13
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

lib/lowdbKv.d.ts

@@ -24,3 +24,3 @@ import { LowDbBase } from './baseLowDb';

find(fieldname: string, value: any): Promise<{
result: string | undefined;
result: any;
error?: undefined;

@@ -27,0 +27,0 @@ } | {

@@ -33,5 +33,7 @@ import { LowDbBase } from './baseLowDb';

const { data } = this.db;
return {
result: Object.keys(data).find((key) => data.hasOwnProperty(key) && data[key].hasOwnProperty(fieldname) && data[key][fieldname] === value)
};
if (!data) {
return { error: 'no data' };
}
const findedKey = Object.keys(data).find((key) => data.hasOwnProperty(key) && data[key].hasOwnProperty(fieldname) && data[key][fieldname] === value) || '';
return { result: data[findedKey] };
}

@@ -38,0 +40,0 @@ catch (error) {

{
"name": "dbtempo",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc