Sha256: 59dbfd4d9ebece698958f7eea9554d277d5f8ed2a1eb2a241f02260a47ac7dec

Contents?: true

Size: 1.12 KB

Versions: 23

Compression:

Stored size: 1.12 KB

Contents

{"version":3,"sources":["../src/alignTableData.js"],"names":["rows","config","map","cells","value","index1","column","columns","width","alignment"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA;;;;;wBAKgBA,I,EAAMC,M,KAAW;AAC/B,SAAOD,IAAI,CAACE,GAAL,CAAUC,KAAD,IAAW;AACzB,WAAOA,KAAK,CAACD,GAAN,CAAU,CAACE,KAAD,EAAQC,MAAR,KAAmB;AAClC,YAAMC,MAAM,GAAGL,MAAM,CAACM,OAAP,CAAeF,MAAf,CAAf;;AAEA,UAAI,0BAAYD,KAAZ,MAAuBE,MAAM,CAACE,KAAlC,EAAyC;AACvC,eAAOJ,KAAP;AACD,OAFD,MAEO;AACL,eAAO,0BAAYA,KAAZ,EAAmBE,MAAM,CAACE,KAA1B,EAAiCF,MAAM,CAACG,SAAxC,CAAP;AACD;AACF,KARM,CAAP;AASD,GAVM,CAAP;AAWD,C","sourcesContent":["import stringWidth from 'string-width';\nimport alignString from './alignString';\n\n/**\n * @param {table~row[]} rows\n * @param {Object} config\n * @returns {table~row[]}\n */\nexport default (rows, config) => {\n  return rows.map((cells) => {\n    return cells.map((value, index1) => {\n      const column = config.columns[index1];\n\n      if (stringWidth(value) === column.width) {\n        return value;\n      } else {\n        return alignString(value, column.width, column.alignment);\n      }\n    });\n  });\n};\n"],"file":"alignTableData.js"}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
trusty-cms-5.0.7 node_modules/table/dist/alignTableData.js.map
trusty-cms-5.0.6 node_modules/table/dist/alignTableData.js.map
trusty-cms-5.0.5 node_modules/table/dist/alignTableData.js.map
trusty-cms-5.0.4 node_modules/table/dist/alignTableData.js.map
trusty-cms-5.0.3 node_modules/table/dist/alignTableData.js.map
trusty-cms-5.0.2 node_modules/table/dist/alignTableData.js.map
trusty-cms-5.0.1 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.3.5 node_modules/table/dist/alignTableData.js.map
trusty-cms-5.0.0 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.3.4 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.3.3 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.3.2 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.3.1 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.3 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.2.3 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.2.2 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.2.1 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.2 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.1.9 node_modules/table/dist/alignTableData.js.map
trusty-cms-4.1.8 node_modules/table/dist/alignTableData.js.map