JavaScript Parser

Open-source JavaScript projects categorized as Parser

Top 23 JavaScript Parser Projects

  • marked

    A markdown parser and compiler. Built for speed.

  • Project mention: Eleventy vs. Next.js for static site generation | dev.to | 2023-12-14

    Next, install gray-matter to extract metadata from the front matter of markdown files, and marked to convert the markdown files to HTML:

  • terser

    πŸ—œ JavaScript parser, mangler and compressor toolkit for ES6+

  • Project mention: Obfuscating your create react app and routes | dev.to | 2024-01-17

    During my intial search i came across some outdated libraries like javascript-obfuscator and uglify-js(as if javascript code can get any uglier, am I right?). Then, I stumbled upon Terser, a modern library that supports ES6.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • astexplorer

    A web tool to explore the ASTs generated by various parsers.

  • Project mention: Understanding Code Structure: A Beginner's Guide to Tree-sitter | dev.to | 2024-04-06

    You can play with your code here, and visualise ASTs for the same.

  • remarkable

    Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.

  • body-parser

    Node.js body parsing middleware

  • Project mention: NodeJS Security Best Practices | dev.to | 2024-02-19

    Using body-parser you can set the limit on the size of the payload

  • parser

    πŸ“œ Extract meaningful content from the chaos of a web page

  • Project mention: Show HN: I made a tool to clean and convert any webpage to Markdown | news.ycombinator.com | 2024-04-14

    Thoroughly scraping is challenging, especially in an environment where you don’t have (or want) a JavaScript runtime.

    For content extraction, I found the approach the Postlight library takes quite neat. It scores individual html nodes based on some heuristics (text length, link density, css classes). It the selects the nodes with the highest score. [1] I ported it to Swift for a personal read later app.

    [1] https://github.com/postlight/parser

  • ohm

    A library and language for building parsers, interpreters, compilers, etc.

  • Project mention: Ohm: A library and language for building parsers, interpreters, compilers, etc. | news.ycombinator.com | 2023-10-31

    Building an interpreter or a compiler from a grammar is an interesting idea. I can't immediately see how to go about it - the grammar would need to match on SSA or similar.

    The examples have a lisp-like interpreter at https://github.com/ohmjs/ohm/blob/main/examples/simple-lisp/... which definitely uses a grammar for parsing and might use a generic AST representation.

    Will have to think more - a grammar might be a worthwhile way to specify a nanopass style compiler pipeline.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • globalize

    A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data

  • nearley

    πŸ“œπŸ”œπŸŒ² Simple, fast, powerful parser toolkit for JavaScript.

  • Project mention: Writing a C compiler in 500 lines of Python | news.ycombinator.com | 2023-09-04

    While I suspect I would learn more writing a tokenizer and parsing logic myself I find grammars much easier to read and maintain.

    ANTLR is pretty good and is supported across several languages and something I had previously used for some quick Elasticsearch query syntax munging in Python. It also means you can often start from an already existing grammar.

    The JS version of ANTLR didn't seem to work for me so for the SQL/JSONPath stuff ended up using the Moo lever and Nearly parser which was rather pleasant. https://nearley.js.org

  • posthtml

    PostHTML is a tool to transform HTML/XML with JS plugins

  • fast-xml-parser

    Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.

  • snarkdown

    :smirk_cat: A snarky 1kb Markdown parser written in JavaScript

  • croner

    Trigger functions or evaluate cron expressions in JavaScript or TypeScript. No dependencies. Most features. Node. Deno. Bun. Browser.

  • Project mention: Croner – Cron for JavaScript and TypeScript | news.ycombinator.com | 2023-08-30
  • csstree

    A tool set for CSS including fast detailed parser, walker, generator and lexer based on W3C specs and browser implementations

  • Project mention: Building a lightweight CSS formatter | dev.to | 2023-06-12

    After thinking about the problem for a while I realised that I could enlist the help of CSSTree to do some of the work. The CSS Analyzer is based on CSSTree's AST, so I know how the thing works and the dependency is already on the page, so no need to download more dependencies. Prettier + Postcss cost almost 340kB to download, which isn't huge, but it would be nice if we could reduce that amount.

  • google-libphonenumber

    The up-to-date and reliable Google's libphonenumber package for node.js.

  • xml-js

    Converter utility between XML text and Javascript object / JSON text.

  • arg

    Simple argument parsing

  • expr-eval

    Mathematical expression evaluator in JavaScript

  • swagger-parser

    Swagger 2.0 and OpenAPI 3.0 parser/validator

  • exifr

    πŸ“· The fastest and most versatile JS EXIF reading library.

  • Project mention: Exif reader packages | /r/rprogramming | 2023-06-09

    I found this tool for JS that allows for 30x quicker exif tag reading than exiftool from photos, and here is a comparison:

  • himalaya

    JavaScript HTML to JSON Parser (by andrejewski)

  • peggy

    Peggy: Parser generator for JavaScript

  • Project mention: Peggy: Parser Generator for JavaScript | news.ycombinator.com | 2023-11-24
  • webassemblyjs

    Toolchain for WebAssembly

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

JavaScript Parser related posts

Index

What are some of the best open-source Parser projects in JavaScript? This list will help you:

Project Stars
1 marked 31,845
2 terser 8,419
3 astexplorer 5,932
4 remarkable 5,667
5 body-parser 5,381
6 parser 5,245
7 ohm 4,877
8 globalize 4,777
9 nearley 3,545
10 posthtml 2,924
11 fast-xml-parser 2,345
12 snarkdown 2,215
13 croner 1,862
14 csstree 1,835
15 google-libphonenumber 1,348
16 xml-js 1,245
17 arg 1,200
18 expr-eval 1,127
19 swagger-parser 1,055
20 exifr 994
21 himalaya 910
22 peggy 806
23 webassemblyjs 768

Sponsored
The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
workos.com