
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
markdown-it-pivot-table
Advanced tools
A markdown-it plugin to add pivot table support.
CNT()
, MIN()
, MAX()
, SUM()
, and AVG()
work with numeric values.
ANY()
works with strings.
const mdp = require('markdown-it-pivot-table');
const md = require('markdown-it')().use(mdp);
const source = `
|Group=Item|Cost=SUM()|
|---|---|
|Candies|1.00|
|Chips|3.00|
|Candies|1.00|
|Drinks|2.00|
`;
const result = md.render(source);
console.log(result);
Result:
Item | Cost |
---|---|
Candies | 2.00 |
Chips | 3.00 |
Drinks | 2.00 |
Reference column names with curly braces to compute numeric values on the fly:
|Group=Category|Group=Sub-category|Item|Unit Cost|Qty|Subtotal=SUM()|
|---|---|---|---|---|---|
|Electrical|Wires|14/2 (/m)|||150|
|Electrical|Wires|10/3 (/m)|||99.80|
|Electrical|Devices|Breakers|29.97|3|{Unit Cost}*{Qty}|
Result:
Category | Sub-category | Subtotal |
---|---|---|
Electrical | Wires | 249.80 |
Electrical | Devices | 89.91 |
If all rows have the same value for a column, then specify the equation right in the header line and leave the cells blank:
|Group=Category|Group=Sub-category|Item|Unit Cost|Qty|Subtotal=SUM({Unit Cost}*{Qty})|
|---|---|---|---|---|---|
|Wall|Drywall|1/2" (/sheet)|17.35|25|
|Wall|Mud|Quickset|15|2|
|Wall|Mud|All Purpose|35|3|
Result:
Category | Sub-category | Subtotal |
---|---|---|
Wall | Drywall | 433.75 |
Wall | Mud | 135.00 |
FAQs
A markdown-it plugin to add pivot table support
The npm package markdown-it-pivot-table receives a total of 353 weekly downloads. As such, markdown-it-pivot-table popularity was classified as not popular.
We found that markdown-it-pivot-table 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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.