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

@hestia-earth/utils

Package Overview
Dependencies
Maintainers
1
Versions
67
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.1 to 0.9.2

6

dist/validate-terms.d.ts

@@ -0,1 +1,7 @@

declare class Term {
'@id': string;
name: string;
}
export declare const validateTerms: (terms: Term[]) => Promise<(string | true)[]>;
export declare const run: () => Promise<string[]>;
export {};

7

dist/validate-terms.js

@@ -55,3 +55,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.run = void 0;
exports.run = exports.validateTerms = void 0;
var fs_1 = require("fs");

@@ -123,3 +123,3 @@ var path_1 = require("path");

};
var queryTerms = function (terms) { return __awaiter(void 0, void 0, void 0, function () {
var validateTerms = function (terms) { return __awaiter(void 0, void 0, void 0, function () {
var query, results;

@@ -156,2 +156,3 @@ return __generator(this, function (_a) {

}); };
exports.validateTerms = validateTerms;
var validateFile = function (_a) {

@@ -165,3 +166,3 @@ var filepath = _a.filepath, data = _a.data;

terms = array_1.unique(getAllTerms(data));
return [4, queryTerms(terms)];
return [4, exports.validateTerms(terms)];
case 1:

@@ -168,0 +169,0 @@ missing = _b.sent();

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

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

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

const queryTerms = async (terms: Term[]) => {
/**
* Validate a list of Terms.
*
* @param terms The list of Terms to validate.
* @returns The list of ids/names that could not be found (invalid).
*/
export const validateTerms = async (terms: Term[]) => {
const query = {

@@ -78,3 +84,3 @@ bool: {

const terms = unique(getAllTerms(data));
const missing = await queryTerms(terms);
const missing = await validateTerms(terms);
return {

@@ -81,0 +87,0 @@ filepath,

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