ArchieML is a lightweight markup language designed for structured text data, frequently employed in journalistic workflows to transform content from Google Documents into machine-readable formats. This JavaScript parser, `archieml-js`, translates ArchieML documents (strings) into JavaScript objects. The current stable version is 0.5.0. Releases for `archieml-js` are typically driven by updates to the external ArchieML specification rather than a fixed time cadence. Its key differentiators include its minimalistic syntax, focus on structured data, and particular utility in pre-processing Google Docs content for data extraction. The library provides a single, straightforward `load` function for parsing ArchieML strings.
npm install archiemlVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic parsing of an ArchieML string into a JavaScript object, including how to enable deprecated inline comments.
To continue using inline comments, pass `{ comments: true }` as the second argument to the `load` function: `archieml.load(doc, { comments: true });`Review ArchieML documents for arrays with duplicate keys and adjust document structure or parsing expectations accordingly, as previous values will be overwritten.
Ensure `:skip` blocks are not inadvertently placed within multi-line values, or modify documents to explicitly break values if `:skip` is intended to truncate.
Always consult the official ArchieML specification (archieml.org) when designing or troubleshooting ArchieML documents to understand the expected parsing rules for a given version.
Enable comment parsing by passing an options object to the `load` function: `archieml.load(yourAmlString, { comments: true });`This is the intended behavior since v0.2.0. If you need to append to an array, ensure distinct keys or structure your ArchieML to reflect overwriting behavior.
For CommonJS, use `const archieml = require('archieml');`. For ESM, use `import archieml from 'archieml';`. For browsers, include `<script src="archieml.js"></script>` and ensure the `archieml` global is available before use.No dependency data recorded yet.