New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@twotalltotems/paginatable-list

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twotalltotems/paginatable-list - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

2

package.json
{
"name": "@twotalltotems/paginatable-list",
"version": "0.0.7",
"version": "0.0.8",
"description": "A self-managed list with pagination.",

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

@@ -5,5 +5,6 @@ import { createActions, createReducer } from 'reduxsauce';

export default class PaginationStateManager {
constructor(name, url) {
constructor(name, url, responseStructure = null) {
this.name = name
this.endpointUrl = url
this.responseStructure = responseStructure
this.initialState = {

@@ -71,4 +72,11 @@ items: []

.then(response => {
dispatch(this.actions.loadMore(response.data))
successCallback()
if (this.responseStructure) {
var subsetKey = Object.keys(this.responseStructure).filter(key => this.responseStructure[key] === 'items')[0]
if (subsetKey) {
dispatch(this.actions.loadMore(response.data[subsetKey]))
}
} else {
dispatch(this.actions.loadMore(response.data))
}
successCallback(response.data)
})

@@ -75,0 +83,0 @@ .catch(error => {

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