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. Learn more β
Top 23 JavaScript Parser Projects
-
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.
-
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.
-
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.
-
globalize
A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
-
fast-xml-parser
Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
-
croner
Trigger functions or evaluate cron expressions in JavaScript or TypeScript. No dependencies. Most features. Node. Deno. Bun. Browser.
-
csstree
A tool set for CSS including fast detailed parser, walker, generator and lexer based on W3C specs and browser implementations
-
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.
Next, install gray-matter to extract metadata from the front matter of markdown files, and marked to convert the markdown files to HTML:
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.
Project mention: Understanding Code Structure: A Beginner's Guide to Tree-sitter | dev.to | 2024-04-06You can play with your code here, and visualise ASTs for the same.
Using body-parser you can set the limit on the size of the payload
Project mention: Show HN: I made a tool to clean and convert any webpage to Markdown | news.ycombinator.com | 2024-04-14Thoroughly 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
Project mention: Ohm: A library and language for building parsers, interpreters, compilers, etc. | news.ycombinator.com | 2023-10-31Building 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.
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
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.
I found this tool for JS that allows for 30x quicker exif tag reading than exiftool from photos, and here is a comparison:
JavaScript Parser related posts
- Understanding Code Structure: A Beginner's Guide to Tree-sitter
- How to create your own Eslint rule with tests, boosting the DX, and code-review
- Obfuscating your create react app and routes
- Peggy: Parser Generator for JavaScript
- Plug-in for formatting saved websites directly into Obsidian
- ESLint: under the hood
- 10 Bad Habits That Can Slow Down Your JavaScript Applications π
-
A note from our sponsor - InfluxDB
www.influxdata.com | 25 Apr 2024
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