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

@appbaseio/reactivecore

Package Overview
Dependencies
Maintainers
6
Versions
289
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appbaseio/reactivecore - npm Package Compare versions

Comparing version 9.13.1 to 9.13.2

2

lib/reducers/compositeAggsReducer.js

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

Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};exports.default=compositeAggsReducer;var _constants=require('../constants');function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}return arr2;}else{return Array.from(arr);}}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}function compositeAggsReducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var action=arguments[1];if(action.type===_constants.UPDATE_COMPOSITE_AGGS){var aggsResponse=Object.values(action.aggregations)&&Object.values(action.aggregations)[0];var fieldName=Object.keys(action.aggregations)[0];if(!aggsResponse)return state;var buckets=aggsResponse.buckets||[];var parsedAggs=buckets.map(function(bucket){var doc_count=bucket.doc_count,key=bucket.key,hitsData=bucket[fieldName];var flatData={};var _source={};if(hitsData&&hitsData.hits){var _hitsData$hits$hits$=hitsData.hits.hits[0];_source=_hitsData$hits$hits$._source;flatData=_objectWithoutProperties(_hitsData$hits$hits$,['_source']);}return _extends({_doc_count:doc_count,_key:typeof key==='string'?key:key[fieldName],top_hits:hitsData},flatData,_source);});return _extends({},state,_defineProperty({},action.component,action.append?[].concat(_toConsumableArray(state[action.component]),_toConsumableArray(parsedAggs)):parsedAggs));}return state;}
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};exports.default=compositeAggsReducer;var _constants=require('../constants');function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}return arr2;}else{return Array.from(arr);}}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}function compositeAggsReducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var action=arguments[1];if(action.type===_constants.UPDATE_COMPOSITE_AGGS){var aggsResponse=Object.values(action.aggregations)&&Object.values(action.aggregations)[0];var fieldName=Object.keys(action.aggregations)[0];if(!aggsResponse)return state;var buckets=[];if(aggsResponse.buckets&&Array.isArray(aggsResponse.buckets)){buckets=aggsResponse.buckets;}var parsedAggs=buckets.map(function(bucket){var doc_count=bucket.doc_count,key=bucket.key,hitsData=bucket[fieldName];var flatData={};var _source={};if(hitsData&&hitsData.hits){var _hitsData$hits$hits$=hitsData.hits.hits[0];_source=_hitsData$hits$hits$._source;flatData=_objectWithoutProperties(_hitsData$hits$hits$,['_source']);}return _extends({_doc_count:doc_count,_key:typeof key==='string'?key:key[fieldName],top_hits:hitsData},flatData,_source);});return _extends({},state,_defineProperty({},action.component,action.append?[].concat(_toConsumableArray(state[action.component]),_toConsumableArray(parsedAggs)):parsedAggs));}return state;}
{
"name": "@appbaseio/reactivecore",
"version": "9.13.1",
"version": "9.13.2",
"description": "Core architecture of reactive UI libraries",

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