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

@janiscommerce/api-list

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@janiscommerce/api-list - npm Package Compare versions

Comparing version 5.3.1 to 5.3.2

4

CHANGELOG.md

@@ -10,2 +10,6 @@ # Changelog

## [5.3.2] - 2022-04-29
### Changed
- Changed internal implementation so data fetching can be overriden
## [5.3.1] - 2022-04-21

@@ -12,0 +16,0 @@ ### Fixed

20

lib/api-list-data.js

@@ -162,7 +162,4 @@ 'use strict';

const result = await this.model.get(getParams);
const totals = result.length ? await this.model.getTotals() : { total: 0 };
const { result, total } = await this.fetchData(getParams);
const { total } = totals;
const rows = await this.formatRows(result);

@@ -179,2 +176,17 @@

/**
* Get the data with client params
*
* @async
* @throws {Object} - Params to fetch data
* @returns {Object{result, total}} - The result and total data obtained
*/
async fetchData(getParams) {
const result = await this.model.get(getParams);
const { total } = result.length ? await this.model.getTotals() : { total: 0 };
return { total, result };
}
/**
* Set the modelName and parents of API after parsing the endpoint

@@ -181,0 +193,0 @@ *

{
"name": "@janiscommerce/api-list",
"version": "5.3.1",
"version": "5.3.2",
"description": "A package to handle Janis List APIs",

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

@@ -55,2 +55,10 @@ export = ApiListData;

/**
* Get the data with client params
*
* @async
* @throws {Object} - Params to fetch data
* @returns {Object{result, total}} - The result and total data obtained
*/
fetchData(getParams: any): any;
/**
* Set the modelName and parents of API after parsing the endpoint

@@ -57,0 +65,0 @@ *

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