
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
texts.js is a JavaScript library (for Node and for browser) that implements conversion between various “rich” text formats. It does the conversion via universal text model (TextJSON, see below) that is rich enough for most of the texts, yet simple.
Current version of texts.js supports reading of Text (Markdown subset), Pandoc JSON and writing of Text, HTML5, XeLaTeX and Pandoc JSON formats.
$ npm install texts
$ texts --from text --to html5
*Hello* world!
^D
<p><em>Hello<em> world!</p>
For information on options use the following command.
texts --help
Text format produced and recognized by texts.js is similar to Markdown but is not tied to the generation of HTML. The purpose of Text format to represent a structure that can be published in any text format. The major differences from Markdown are:
no support for inline HTML,
explicit format definition (in form of PEG grammar),
one variation of markup for each style.
The following paragraph styles are supported:
headings,
bulleted and numbered lists,
quotations,
verbatim (code) blocks,
math formulas,
images,
footnotes,
hyperlinks.
There is also intention to make Text format a bit more rational. For example, indentation in Markdown can represent either structure (second paragraph in a list) or style (verbatim block). In Text format indentation represents text structure only.
Files in the Text format can be edited in any plain text editor or in a WYSIWYM editor Texts.
TextJSON is the format of the universal text model in text.js. It is based on JsonML, format for structured data. Any TextJSON document is a valid JSON document and thus can be easily produced or consumed in any programming language.
Each TextJSON object is a 2-level structure—an array of blocks, where each block is an array of spans. Above them is a formal root element “text”. Each block has attribute “level” with zero being the level of the main text, positive levels for nested elements and negative levels for headings.
$ texts --from text --to json
*Hello* world!
^D
["text",
["para", { "level": 0 },
["emph", "Hello"],
["plain", " world!"]
]
]
FAQs
TextJSON for Node
We found that texts 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.