
Security News
Open Source Maintainers Demand Ability to Block Copilot-Generated Issues and PRs
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Replace text in native bookmarks in Open XML Document Files (.docx).
Formatting will follow the initial style inside the bookmark. That is to say, if you have content inside the bookmark the first character defines the styling. This is the same behavior supplied in Microsoft Word's libraries.
This library will also only handle text, nothing else.
I say all of that to say if you need more advanced formatting and content options then you should be using docxtemplater.
npm i docxmarks --save
const docxmarks = require('docxmarks')
const fs = require('fs')
const docx = fs.readFileSync('path/to/document.docx')
const replacements = {
first: 'Andrew',
last: (val) => val || 'Carpenter',
maybeNoBookmark: {append: true, setter: 'There is one now'}
}
docxmarks(docx, replacements).then((data) => {
fs.writeFileSync('path/to/newDocument.docx', data)
})
Promise
resolving with new docx data in the same encoding as provided in input.** omitting replacements
will resolve with an object describing bookmarks currently in the document*
docxmarks(*docxData, *replacements)
*setter
, *append
}
Version 2.0.0 is a complete re-write with 100% different API. Use new API if upgrading from an old version, as there is no transitional API.
MIT © Andrew Carpenter
FAQs
Super simple bookmark replacement / mail merge for docx files
The npm package docxmarks receives a total of 9 weekly downloads. As such, docxmarks popularity was classified as not popular.
We found that docxmarks 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
Open source maintainers are urging GitHub to let them block Copilot from submitting AI-generated issues and pull requests to their repositories.
Research
Security News
Malicious Koishi plugin silently exfiltrates messages with hex strings to a hardcoded QQ account, exposing secrets in chatbots across platforms.
Research
Security News
Malicious PyPI checkers validate stolen emails against TikTok and Instagram APIs, enabling targeted account attacks and dark web credential sales.