
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
xlsx-report-ex
Advanced tools
Поддерживаемые файлы: xlsx
Поддерживается 2 вида выражений:
{{value|pipe:arg1:argN}}
[[value|pipe:arg1:argN]]
Где:
value
- некоторое значение или массивpipe
- некоторая функция дополнительной обработки значенияarg1
, argN
- агрументы/параметры передаваемые в функцию обработки значения{{propertyName}}
- вывод значения без обработки
{{propertyName|date}}
- значение форматируется как дата
{{fileName|image}}
- производится поиск картинки по имени файла.
Если картинка найдена, то она встраивается в ячейку таблицы
{{propertyArrayName|find:propertyName:propertyValue}}
- поиск объекта в массиве propertyArrayName
у которого есть свойство propertyName
равное propertyValue
{{propertyObjectName|get:propertyName}}
- возвращает значение свойства propertyArrayName
из объекта propertyObjectName
[[array|repeat-rows:3]]
- обрабатать массив переменных и
вывести его содержимое в секцию из 3 строк начиная с текущей.
Строки будут продублированы в соответствии с размером массива.
[[array|filter:propertyName:checkValue]]
- отфильтровать массив.
Если указано только propertyName
, то на выходе получим массив с объектами содержащими это поле.
Если указано propertyName
и checkValue
, то на выходе получим массив с объектами которые содержат
свойство propertyName
равное checkValue
.
Будем выводить в шаблонизаторе такие данные:
let data = {
reportBuildDate: 1526443275041,
results: [
{ text: 'some text 1', answerText: 'a text of an answer 1'},
{ text: 'some text 2', answerText: 'a text of an answer 2'},
{ text: 'some text 3', answerText: 'a text of an answer 3'},
{ answerText: 'a text of an answer 3'},
],
};
Составим шаблон:
!!! В данном примере / указано вместо |
A | B |
---|---|
{{reportBuildDate/date}} | {{results/find:text:some text 2/get:answerText}} |
[[results/filter:text/repeat-rows:1]] {{text}} | {{answerText}} |
Получим результат:
A | B |
---|---|
16.05.2018 | a text of an answer 2 |
some text 1 | a text of an answer 1 |
some text 2 | a text of an answer 2 |
some text 3 | a text of an answer 3 |
FAQs
The template engine for generate xlsx documents
The npm package xlsx-report-ex receives a total of 2 weekly downloads. As such, xlsx-report-ex popularity was classified as not popular.
We found that xlsx-report-ex demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.