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 6.1.0 to 6.2.0

27

dist/fergies-inverted-index.cjs.js

@@ -186,3 +186,7 @@ 'use strict';

// {gte:..., lte:...} (gte/lte == greater/less than or equal)
const BUCKET = token => parseToken(token).then(token => GET(token).then(
const BUCKET = token => parseToken(
token // TODO: is parseToken needed her? Already called in GET
).then(token => GET(
token
).then(
result => {

@@ -230,3 +234,17 @@ const re = new RegExp('[○' + ops.tokenAppend + ']', 'g');

const DIST = token => parseToken(token).then(token => Promise.all(
const DISTINCT = (...tokens) => Promise.all(
// if no tokens specified then get everything ('{}')
tokens.length ? tokens.map(DIST) : [DIST({})]
).then(
dist => [
...dist.flat().reduce(
(acc, cur) => acc.add(JSON.stringify(cur)),
new Set())
].map(JSON.parse)
);
// TODO should take an array of tokens
const DIST = token => parseToken(
token
).then(token => Promise.all(
token.FIELD.map(field => getRange({

@@ -247,3 +265,4 @@ gte: field + ':' + token.VALUE.GTE,

BUCKETFILTER: BUCKETFILTER,
DIST: DIST,
// DIST: DIST,
DISTINCT: DISTINCT,
EXPORT: getRange,

@@ -446,3 +465,3 @@ GET: GET,

DELETE: init$1(db, ops).DELETE,
DISTINCT: init(db, ops).DIST,
DISTINCT: init(db, ops).DISTINCT,
EXPORT: init(db, ops).EXPORT,

@@ -449,0 +468,0 @@ FIELDS: init(db, ops).FIELDS,

@@ -182,3 +182,7 @@ import level from 'level';

// {gte:..., lte:...} (gte/lte == greater/less than or equal)
const BUCKET = token => parseToken(token).then(token => GET(token).then(
const BUCKET = token => parseToken(
token // TODO: is parseToken needed her? Already called in GET
).then(token => GET(
token
).then(
result => {

@@ -226,3 +230,17 @@ const re = new RegExp('[○' + ops.tokenAppend + ']', 'g');

const DIST = token => parseToken(token).then(token => Promise.all(
const DISTINCT = (...tokens) => Promise.all(
// if no tokens specified then get everything ('{}')
tokens.length ? tokens.map(DIST) : [DIST({})]
).then(
dist => [
...dist.flat().reduce(
(acc, cur) => acc.add(JSON.stringify(cur)),
new Set())
].map(JSON.parse)
);
// TODO should take an array of tokens
const DIST = token => parseToken(
token
).then(token => Promise.all(
token.FIELD.map(field => getRange({

@@ -243,3 +261,4 @@ gte: field + ':' + token.VALUE.GTE,

BUCKETFILTER: BUCKETFILTER,
DIST: DIST,
// DIST: DIST,
DISTINCT: DISTINCT,
EXPORT: getRange,

@@ -442,3 +461,3 @@ GET: GET,

DELETE: init$1(db, ops).DELETE,
DISTINCT: init(db, ops).DIST,
DISTINCT: init(db, ops).DISTINCT,
EXPORT: init(db, ops).EXPORT,

@@ -445,0 +464,0 @@ FIELDS: init(db, ops).FIELDS,

2

package.json
{
"name": "fergies-inverted-index",
"version": "6.1.0",
"version": "6.2.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