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 🙏

© 2026 – Pkg Stats / Ryan Hefner

feascript

v0.2.0

Published

Lightweight finite element simulation library built in JavaScript

Readme

FEAScript-core

npm version

FEAScript is a lightweight finite element simulation library written in JavaScript. It empowers users to perform simulations for physics and engineering applications in both browser-based and server-side environments. This is the core library of the FEAScript project.

🚧 FEAScript is currently under heavy development. Its functionality and interfaces may change rapidly as new features and enhancements are introduced.

Features

  • Physics models: creeping (Stokes) flow, front propagation, heat conduction
  • Meshing: simple 1D/2D mesh generation, unstructured mesh import from Gmsh (.msh)
  • Solvers: frontal, Jacobi (CPU/WebGPU) and LU, Newton–Raphson for nonlinear systems
  • Performance: web worker support for multi-threaded computation
  • Visualization: interactive plots with Plotly

How to Use FEAScript

You can run simulations with FEAScript by calling its functions from JavaScript (the FEAScript API). The API is the core programmatic interface for FEAScript and works across multiple environments, including the browser (simple HTML pages and online JavaScript playgrounds, e.g. CodePen and Scribbler) and server-side runtimes such as Node.js. The most common ways to use FEAScript are outlined below:

  1. In the browser – Run FEAScript directly in a simple HTML page to perform simulations locally with no additional installations or cloud services required.
  2. In JavaScript playgrounds – Try FEAScript in interactive JavaScript playgrounds such as CodePen or Scribbler.
  3. With Node.js – Use FEAScript in server-side JavaScript applications.

Use FEAScript in the Browser

You can use FEAScript in browser environments in three ways:

  • Import from Hosted ESM Build:

    <script type="module">
      import { FEAScriptModel } from "https://core.feascript.com/dist/feascript.esm.js";
    </script>
  • Import from CDN:

    <script type="module">
      import { FEAScriptModel } from "https://cdn.jsdelivr.net/gh/FEAScript/FEAScript-core/dist/feascript.esm.js";
    </script>
  • Download and Use Locally:

    You can download the latest stable release from GitHub Releases.

    <script type="module">
      import { FEAScriptModel } from "./path/to/dist/feascript.esm.js";
    </script>

👉 Explore browser-based tutorials on our website.

Use FEAScript in JavaScript Playgrounds

FEAScript works well in interactive JavaScript playgrounds where you can write code, visualize results inline, and share your work.

👉 Explore the following examples:

Use FEAScript with Node.js

Install FEAScript and its peer dependencies from npm as follows:

npm install feascript mathjs plotly.js

Then, import it in your JavaScript file:

import { FEAScriptModel } from "feascript";

Important: FEAScript is built as an ES module. If you're starting a completely new project (outside this repository), make sure to configure it to use ES modules by:

# Create package.json with type=module for ES modules support
echo '{"type":"module"}' > package.json

When running examples from within this repository, this step isn’t needed as the root package.json already has the proper configuration.

👉 Explore Node.js use cases on the examples directory.

Examples

Here is a minimal browser-based example using the FEAScript API. Adapt paths, physics model, and boundary conditions as needed for your specific problem:

<body>
  <!-- ...body region... -->
  <script type="module">
    // Import FEAScript library
    import { FEAScriptModel } from "https://core.feascript.com/dist/feascript.esm.js";

    window.addEventListener("DOMContentLoaded", () => {
      // Create a new FEAScript model
      const model = new FEAScriptModel();

      // Select physics/PDE
      model.setModelConfig("physicsModel"); // Example: "heatConductionScript"

      // Configure the mesh
      model.setMeshConfig({
        meshDimension: "1D", // Choose either "1D" or "2D"
        elementOrder: "linear", // Choose either "linear" or "quadratic"
        numElementsX: 10, // Number of elements in x-direction
        numElementsY: 6, // Number of elements in y-direction (for 2D only)
        maxX: 1.0, // Domain length in x-direction
        maxY: 0.5, // Domain length in y-direction (for 2D only)
      });

      // Add boundary conditions with appropriate parameters
      model.addBoundaryCondition("boundaryIndex", ["conditionType" /* parameters */]); // Example boundary condition

      // Solve the problem
      const { solutionVector, nodesCoordinates } = model.solve();
    });
  </script>
  <!-- ...rest of body region... -->
</body>

Note: The code above uses placeholder values that you should replace with appropriate options, e.g.:

  • "physicsModel" should be replaced with an actual solver type such as "heatConductionScript" for heat conduction problems
  • "conditionType" should be replaced with an actual boundary condition type such as "constantTemp"
  • "boundaryIndex" should be replaced with a string identifying the boundary

Support FEAScript

💖 If you find FEAScript useful, please consider supporting its development through a donation:

Your support helps ensure the continued development and maintenance of this project.

Contributing

We warmly welcome contributors to help expand and refine FEAScript. Please see the CONTRIBUTING.md file for detailed guidance on how to contribute.

License

The core library of FEAScript is released under the MIT license. © 2023-2026 FEAScript.