Skip to content

Instantly share code, notes, and snippets.

@abusedmedia
Created May 4, 2024 19:56
Show Gist options
  • Save abusedmedia/3760e1be0dfe54fa6d9d05f210cf4044 to your computer and use it in GitHub Desktop.
Save abusedmedia/3760e1be0dfe54fa6d9d05f210cf4044 to your computer and use it in GitHub Desktop.
const arr = {{ dataset.data }}
const summ = summarizeProperties(arr, ['name'])
let res = ''
for(let p in summ){
const fp = `The property ${p} can have`
const ps = Array.isArray(summ[p])
? ` the following values: ${summ[p].toString()}.`
: ` values between ${summ[p].min} and ${summ[p].max}.`
res += `
${fp}${ps}`
}
return res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment