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

@jsdoc/salty

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsdoc/salty - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

5

lib/salty.js
const _ = require('lodash');
// Install shim for Object.hasOwn() if necessary.
/* istanbul ignore next */
if (!Object.hasOwn) {

@@ -66,2 +67,6 @@ Object.hasOwn = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);

matches = _.isUndefined(item[key]);
} else if (Array.isArray(matcherValue)) {
if (!matcherValue.includes(item[key])) {
matches = false;
}
} else if (matcherValue !== item[key]) {

@@ -68,0 +73,0 @@ matches = false;

6

package.json
{
"name": "@jsdoc/salty",
"version": "0.1.1",
"version": "0.2.0",
"description": "A drop-in replacement for (some of) TaffyDB.",

@@ -28,5 +28,5 @@ "keywords": [

"engines": {
"node": ">=v12.0.0"
"node": ">=v18.12.0"
},
"gitHead": "1577d7f033b5395450e133e0734cfb7c43e1be86"
"gitHead": "12da2f7ecc542117058a144af136d0d7c1bc344e"
}

@@ -103,5 +103,9 @@ # Salty

// Get array of all items
const allItems = db().get();
const emptyMatcher = db().get();
// Get array of items where `a` is either `1` or `3`
const arrayMatcher = db({ a: [1, 3] }).get();
// Get array of items where `a` is `1` and `b` is `hello`
const multiMatcher = db({ a: 1 }, { b: 'hello' }).get();
// Get array of items where `b` is undefined
const someItems = db({ b: { isUndefined: true } }).get();
const undefinedMatcher = db({ b: { isUndefined: true } }).get();
```

@@ -108,0 +112,0 @@

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