Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
docxmarks
Advanced tools
Readme
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 97 weekly downloads. As such, docxmarks popularity was classified as not popular.
We found that docxmarks demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.