Skip to content

Instantly share code, notes, and snippets.

View rubenstolk's full-sized avatar
🛹
Surfing

Ruben Stolk rubenstolk

🛹
Surfing
View GitHub Profile
// Rewrite of https://github.com/cmfcmf/ColumnWidthCalculator, don't understand the logic :)
const NARROWS = '!ifjl,;.:-|\xC2\xA0\n\r\t\0\x0B';
const WIDES = 'wm—G@';
const textWidth = (text = '') => Math.max(1, text.split('').reduce((width, c) => width +
(NARROWS.includes(c) ? 0.4 : WIDES.includes(c) ? 1.3 : 1), 0));
const calculate = (col) => {
col.avg = col.sum / col.count;
<html>
<head>
<base href="http://polygit.org/polymer+v1.9.1/components/">
<link href="iron-icons/iron-icons.html" rel="import">
<link href="iron-icons/av-icons.html" rel="import">
<link href="paper-icon-button/paper-icon-button.html" rel="import">
<link href="paper-checkbox/paper-checkbox.html" rel="import">
<link rel="import" href="iron-pages/iron-pages.html">
info: ------------ ------------------------ ------------------------ Copying answer crm_nummer {
"data": {
"value": "000056566",
"_id": "5efcaf88451895001488ed8f"
},
"evidence": {
"notes": [],
"attachments": []
}
}