npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@obinexuscomputing/dom-asm

v1.0.0

Published

A unified library for DOM manipulation and compilation.

Downloads

54

Readme

DOM-ASM: Automaton State Minimization and AST Optimization Tool

DOM-ASM is a groundbreaking library and command-line tool for automaton state minimization and abstract syntax tree (AST) optimization. Developed through cutting-edge research by Nnamdi Michael Okpala, DOM-ASM provides modern developers with powerful tools for optimizing web assets and DOM management.

This tool is part of Obinexus Computing, a hub of innovation that promotes accessible computing and advocates for digital rights as human rights. For resources, tutorials, and updates, visit our website.

Disclaimer: This technology is patented. It is shared for testing and evaluation purposes only.

Computing from the Heart

For more details on the research behind DOM-ASM, refer to the documentation in the docs folder.


Features

  • Automaton State Minimization: Simplifies finite state machines (FSMs) while preserving behavior and reducing complexity.
  • AST Optimization: Advanced algorithms for optimizing abstract syntax trees across web assets.
  • HTML Parsing and Validation: Accurate and efficient validation for HTML documents.
  • CSS Optimization: AST-based analysis to optimize CSS stylesheets.
  • JavaScript Compilation: Streamlined AST generation, validation, and transformations for JavaScript.
  • CLI Support: A powerful command-line interface (dom-asm) for automation and integration.
  • Modular Workspace Packages:
    • @obinexuscomputing/html for HTML handling.
    • @obinexuscomputing/css for CSS parsing and validation.
    • @obinexuscomputing/js for JavaScript AST optimization and validation.
  • TurboRepo Support: Optimized builds and tasks across all packages.

Installation

Using npm

Install the CLI globally:

npm install -g @obinexuscomputing/dom-asm

Local Development

Clone the repository and set up the workspace:

git clone https://github.com/obinexuscomputing/dom-asm.git
cd dom-asm
npm install

Link the CLI for local development:

npm link

Usage

CLI Commands

Build the Project

dom-asm build

Compiles the HTML, CSS, and JavaScript packages into optimized bundles.

Validate a File

dom-asm validate <file>

Validates the provided HTML, CSS, or JavaScript file.

Example

dom-asm validate index.html

Output:

Validating file: index.html
Validation passed!

Development Workflow

Project Structure

project/
├── bin/                # CLI entry point
├── docs/               # Documentation
├── packages/           # Workspace packages (html, css, js)
├── src/                # Core source code
├── rollup.config.js    # Rollup configuration
├── tsconfig.json       # TypeScript configuration
├── turbo.json          # TurboRepo configuration
├── package.json        # Package metadata
└── README.md           # This file

Running Tests

Run unit tests for all packages:

npm run test

Applications

The real-world applications of DOM-ASM include:

1. Optimized Server-Side Rendering (SSR)

  • DOM-ASM reduces DOM complexity using AST minimization and state transitions, leading to faster server-side hydration.
  • Ideal for high-performance SSR frameworks where rendering time directly impacts performance.

2. Static Site Generation (SSG)

  • Precomputes optimized HTML, CSS, and JavaScript during build time.
  • Ensures smaller bundles and reduced runtime overhead for static websites.

3. Frontend Performance Optimization

  • Eliminates unused CSS rules and JavaScript dead code using AST analysis.
  • Reduces bundle sizes and speeds up page load times.

4. Edge Computing

  • Lightweight parsing and lazy evaluation techniques allow deployment on edge devices.
  • Efficient DOM transformations with minimal resource usage.

5. Progressive Web Apps (PWAs)

  • Improves performance and interactivity for PWAs through precompiled and optimized assets.
  • Reduces memory consumption for complex DOM trees.

6. Low-Powered Devices

  • AST-driven automaton processing minimizes runtime operations, making it ideal for devices with limited memory and processing power.

7. Modern Build Pipelines

  • Integrates into existing tools like Vite, Rollup, or Webpack for faster build times.
  • Provides a CLI for seamless integration into CI/CD workflows.

Impact

The research-backed AST and automaton optimization provided by DOM-ASM can:

  • Reduce DOM hydration times compared to React and Vue.
  • Enable build-time optimizations that shift computation away from runtime.
  • Lower resource consumption, making web applications faster and greener.
  • Provide a modular solution for cross-asset (HTML, CSS, JS) optimization.

With its focus on performance, accessibility, and efficiency, DOM-ASM represents the next step in modern web tooling.


Contributing

We welcome contributions! To contribute:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature-name
  3. Make your changes and commit them:
    git commit -m "Add feature-name"
  4. Push your changes:
    git push origin feature-name
  5. Open a pull request.

License

This project is licensed under the ISC License. See the LICENSE file for details.


Acknowledgements

Special thanks to the Obinexus Computing team and the groundbreaking research by Nnamdi Michael Okpala that powers this project. Obinexus Computing also stands as an advocate for accessible computing and digital rights as human rights.

Computing from the Heart