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

wikibase-sdk

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikibase-sdk - npm Package Compare versions

Comparing version 7.4.2 to 7.4.3

17

lib/helpers/simplify_text_attributes.js
const simplifyTextAttributes = multivalue => data => {
return Object.keys(data).reduce(aggregateValues(data, multivalue), {})
const simplified = {}
Object.keys(data).forEach(lang => {
const obj = data[lang]
if (obj != null) {
simplified[lang] = multivalue ? obj.map(getValue) : obj.value
} else {
simplified[lang] = multivalue ? [] : null
}
})
return simplified
}
const aggregateValues = (data, multivalue) => (index, lang) => {
const obj = data[lang]
index[lang] = multivalue ? obj.map(getValue) : obj.value
return index
}
const getValue = obj => obj.value

@@ -12,0 +15,0 @@

{
"name": "wikibase-sdk",
"version": "7.4.2",
"version": "7.4.3",
"description": "utils functions to query a Wikibase instance and simplify its results",

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