![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Bibliography Format => AST => CSL JSON
Mission: The goal of this project is to create a single location where high-quality, safe, and efficient X => CSL JSON
parsers can be found.
What this project solves: Currently there exists a wide range of CSL JSON parsers for a variety of reference types. However, most of these parsers rely on unsafe or inefficent methods of parsing input files (generally using complex regular expressions with lookbehinds, or inefficiently looping over the same input text several times). This project abandons that strategy by first parsing input files into Abstract Syntax Trees and then parsing CSL JSON from the tree structure. The result of this is a safer, faster, and more predictable experience for developers.
NOTE: This project is currently a work in progress. The API is subject to change drastically and without warning. Any use of this library is at your own risk until either this message disappears or version ^1.x.x
is released.
$ npm install astrocite
import { parse } from 'astrocite/bibtex';
// or
const parse = require('astrocite/bibtex').parse;
const cslJson = parse(`
@article{my_article,
title = {Hello world},
journal = "Some Journal"
}
`);
import * as astrocite from 'astrocite';
// or
const astrocite = require('astrocite');
const cslJson = astrocite.bibtex.parse(`
@article{my_article,
title = {Hello world},
journal = "Some Journal"
}
`);
ASTs are also available if needed.
import { AST } from 'astrocite/bibtex';
// or
// import { AST } from 'astrocite/ris';
// ....etc
const bibtexAST = AST.parse(`
@article{my_article,
title = {Hello world},
journal = "Some Journal"
}
`);
Note: Examples for each individual AST can be found in the README file of each subdirectory.
PRs accepted. Please see our Roadmap and Contributing Guidelines for more details.
MIT © 2017 Derek P Sifford
FAQs
Bibliography file format => AST => CSL JSON
The npm package astrocite receives a total of 64 weekly downloads. As such, astrocite popularity was classified as not popular.
We found that astrocite 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.