Socket
Socket
Sign inDemoInstall

@hestia-earth/utils

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hestia-earth/utils - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

7

dist/validate-terms.js

@@ -120,4 +120,3 @@ "use strict";

})
.filter(function (term) { return !!term && term['@type'] === 'Term' && (term['@id'] || term.name); })
.map(function (term) { return ({ id: term['@id'], name: term.name }); });
.filter(function (term) { return (!!term) && (term['@type'] === 'Term') && (!!term['@id'] || !!term.name); });
};

@@ -135,3 +134,3 @@ var queryTerms = function (terms) { return __awaiter(void 0, void 0, void 0, function () {

should: terms.map(function (_a) {
var id = _a.id, name = _a.name;
var id = _a["@id"], name = _a.name;
return ({ match: id ? { '@id.keyword': id } : { 'name.keyword': name } });

@@ -150,3 +149,3 @@ }),

return [2, terms.map(function (_a) {
var id = _a.id, name = _a.name;
var id = _a["@id"], name = _a.name;
var exists = results.find(function (res) { return res['@id'] === id || res.name === name; });

@@ -153,0 +152,0 @@ return exists ? true : id || name;

{
"name": "@hestia-earth/utils",
"version": "0.9.0",
"version": "0.9.1",
"description": "Hestia Utils library",

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

@@ -15,3 +15,3 @@ import { promises } from 'fs';

class Term {
id: string;
'@id': string;
name: string;

@@ -53,4 +53,3 @@ }

})
.filter(term => !!term && term['@type'] === 'Term' && (term['@id'] || term.name))
.map(term => ({ id: term['@id'], name: term.name }));
.filter(term => (!!term) && (term['@type'] === 'Term') && (!!term['@id'] || !!term.name));

@@ -63,3 +62,3 @@ const queryTerms = async (terms: Term[]) => {

}],
should: terms.map(({ id, name }) => ({ match: id ? { '@id.keyword': id } : { 'name.keyword': name } })),
should: terms.map(({ '@id': id, name }) => ({ match: id ? { '@id.keyword': id } : { 'name.keyword': name } })),
minimum_should_match: 1

@@ -73,3 +72,3 @@ }

});
return terms.map(({ id, name }) => {
return terms.map(({ '@id': id, name }) => {
const exists = results.find(res => res['@id'] === id || res.name === name);

@@ -76,0 +75,0 @@ return exists ? true : id || name;

Sorry, the diff of this file is not supported yet

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