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

fergies-inverted-index

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fergies-inverted-index - npm Package Compare versions

Comparing version 3.0.1 to 4.0.0

29

dist/fergies-inverted-index.cjs.js

@@ -196,3 +196,6 @@ 'use strict';

)
)
).then(_objects => _ids.map((_id, i) => {
_id._object = _objects[i];
return _id
}))
}

@@ -362,3 +365,3 @@ }

docs => writer(docs.map((doc, i) => {
if (doc === null) {
if (doc._object === null) {
return {

@@ -368,3 +371,3 @@ _id: _ids[i], status: 'NOT FOUND', mode: 'DELETE'

}
return doc
return doc._object
}), db, 'del')

@@ -397,5 +400,14 @@ ).then(

// _match is nested by default so that AND and OR work correctly under
// the bonnet. Flatten array before presenting to consumer
const flattenMatchArrayInResults = results => results.map(result => {
result._match = result._match.flat(Infinity);
return result
});
const makeAFii = (db, ops) => ({
AVAILABLE_FIELDS: init(db, ops).AVAILABLE_FIELDS,
AND: init(db, ops).INTERSECTION,
AND: (...keys) => init(db, ops).INTERSECTION(...keys).then(
flattenMatchArrayInResults
),
BUCKET: init(db, ops).BUCKET,

@@ -408,6 +420,9 @@ BUCKETFILTER: init(db, ops).BUCKETFILTER,

MIN: init$2(db).MIN,
// NOT: idMap(db).SET_DIFFERENCE,
NOT: init(db, ops).SET_SUBTRACTION,
NOT: (...keys) => init(db, ops).SET_SUBTRACTION(...keys).then(
flattenMatchArrayInResults
),
OBJECT: init$1(db).OBJECT,
OR: init(db, ops).UNION,
OR: (...keys) => init(db, ops).UNION(...keys).then(
flattenMatchArrayInResults
),
PUT: init$3(db).PUT,

@@ -414,0 +429,0 @@ SET_SUBTRACTION: init(db, ops).SET_SUBTRACTION,

@@ -192,3 +192,6 @@ import level from 'level';

)
)
).then(_objects => _ids.map((_id, i) => {
_id._object = _objects[i];
return _id
}))
}

@@ -358,3 +361,3 @@ }

docs => writer(docs.map((doc, i) => {
if (doc === null) {
if (doc._object === null) {
return {

@@ -364,3 +367,3 @@ _id: _ids[i], status: 'NOT FOUND', mode: 'DELETE'

}
return doc
return doc._object
}), db, 'del')

@@ -393,5 +396,14 @@ ).then(

// _match is nested by default so that AND and OR work correctly under
// the bonnet. Flatten array before presenting to consumer
const flattenMatchArrayInResults = results => results.map(result => {
result._match = result._match.flat(Infinity);
return result
});
const makeAFii = (db, ops) => ({
AVAILABLE_FIELDS: init(db, ops).AVAILABLE_FIELDS,
AND: init(db, ops).INTERSECTION,
AND: (...keys) => init(db, ops).INTERSECTION(...keys).then(
flattenMatchArrayInResults
),
BUCKET: init(db, ops).BUCKET,

@@ -404,6 +416,9 @@ BUCKETFILTER: init(db, ops).BUCKETFILTER,

MIN: init$2(db).MIN,
// NOT: idMap(db).SET_DIFFERENCE,
NOT: init(db, ops).SET_SUBTRACTION,
NOT: (...keys) => init(db, ops).SET_SUBTRACTION(...keys).then(
flattenMatchArrayInResults
),
OBJECT: init$1(db).OBJECT,
OR: init(db, ops).UNION,
OR: (...keys) => init(db, ops).UNION(...keys).then(
flattenMatchArrayInResults
),
PUT: init$3(db).PUT,

@@ -410,0 +425,0 @@ SET_SUBTRACTION: init(db, ops).SET_SUBTRACTION,

{
"name": "fergies-inverted-index",
"version": "3.0.1",
"version": "4.0.0",
"description": "An inverted index that allows javascript objects to be easily serialised and retrieved using promises and map-reduce",

@@ -5,0 +5,0 @@ "main": "dist/fergies-inverted-index.cjs.js",

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