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

@hawksightco/hawk-sdk

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hawksightco/hawk-sdk - npm Package Compare versions

Comparing version 0.0.30 to 0.0.31

4

dist/src/classes/Search.d.ts

@@ -26,5 +26,7 @@ import { Token } from "../types";

* @param {string} keyword - The keyword to search for.
* @param {number} limit - Number of results to show.
* @param {boolean} noLimit - disable limit
* @returns {Token[]} An array of tokens that match the given keyword.
*/
token(keyword: string): Token[];
token(keyword: string, limit?: number, noLimit?: boolean): Token[];
/**

@@ -31,0 +33,0 @@ * Loads the token indices and tokens.

@@ -40,5 +40,9 @@ "use strict";

* @param {string} keyword - The keyword to search for.
* @param {number} limit - Number of results to show.
* @param {boolean} noLimit - disable limit
* @returns {Token[]} An array of tokens that match the given keyword.
*/
token(keyword) {
token(keyword, limit = 100, noLimit = false) {
const result = [];
keyword = keyword.trim();
if (this.tokenIndices === undefined || this.tokens === undefined) {

@@ -49,5 +53,8 @@ console.warn("Token list still loading...");

const indices = this.tokenIndices.indices[keyword.toLowerCase()];
const result = [];
let count = 0;
for (const index in indices) {
count++;
result.push(this.tokens[index]);
if (!noLimit && count >= limit)
break;
}

@@ -70,3 +77,3 @@ return result;

yield this.getTokenIndices();
setTimeout(update, 60 * 1000);
setTimeout(update, 5 * 1000);
});

@@ -73,0 +80,0 @@ yield update();

{
"name": "@hawksightco/hawk-sdk",
"version": "0.0.30",
"version": "0.0.31",
"description": "Hawksight v2 SDK",

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

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