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

@arranger/mapping-utils

Package Overview
Dependencies
Maintainers
2
Versions
270
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arranger/mapping-utils - npm Package Compare versions

Comparing version 0.0.11 to 0.0.15-breaking

test/flattenMapping.test.js

17

dist/flattenMapping.js

@@ -10,2 +10,4 @@ "use strict";

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }

@@ -24,3 +26,3 @@

var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
return (0, _lodash.flattenDeep)(Object.entries(properties).filter(function (_ref) {
return (0, _lodash.flattenDeep)(Object.entries(properties).map(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),

@@ -30,12 +32,9 @@ field = _ref2[0],

return data.type && data.type !== 'nested' || data.properties;
}).map(function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 2),
field = _ref4[0],
data = _ref4[1];
return data.type && data.type !== 'nested' ? {
return !data.properties ? {
field: joinWith()(parent) + field,
type: data.type
} : flattenMapping(data.properties, joinWith()(parent) + field);
} : [{
field: joinWith()(parent) + field,
type: data.type || 'object'
}].concat(_toConsumableArray(flattenMapping(data.properties, joinWith()(parent) + field)));
}));

@@ -42,0 +41,0 @@ };

{
"name": "@arranger/mapping-utils",
"version": "0.0.11",
"version": "0.0.15-breaking",
"description": "Transform Elasticsearch mappings",

@@ -25,3 +25,3 @@ "main": "dist/index.js",

"dependencies": {
"@arranger/middleware": "^0.0.10",
"@arranger/middleware": "^0.0.15-breaking",
"babel-polyfill": "^6.26.0",

@@ -28,0 +28,0 @@ "elasticsearch": "^14.0.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