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

@cfvdb/core

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfvdb/core - npm Package Compare versions

Comparing version 1.2.3 to 1.3.0

33

lib/card-searcher.js

@@ -5,6 +5,7 @@ const axios = require('axios');

* Fetches the data of card.
* @param query - The query to search for.
* @param name - The name to search for.
* @param options - The extra options of the search.
* @returns {Promise<*>}
*/
async function search(query, options = {}) {
async function search(name, options = {}) {
if (!options.url) {

@@ -14,6 +15,32 @@ throw new Error('Url of API is not provided.');

let query = '';
if (name) {
query += 'name=' + name;
}
if (options.era) {
query += 'era=' + options.era;
}
if (options.grade) {
query += 'grade=' + options.grade;
}
if (options.nation) {
query += 'nation=' + options.nation;
}
if (options.clan) {
query += 'clan=' + options.clan;
}
if (options.rarity) {
query += 'rarity=' + options.rarity;
}
try {
const response = await axios({
method: 'get',
url: options.url + '?q=' + query
url: options.url + '?' + query
});

@@ -20,0 +47,0 @@

2

package.json
{
"name": "@cfvdb/core",
"version": "1.2.3",
"version": "1.3.0",
"description": "Core functions for CFVDB",

@@ -5,0 +5,0 @@ "main": "index.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