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

member-checks

v0.1.0

Published

EN 1993-1-1 (Eurocode 3) steel member checks as pure, program-agnostic functions — tension, compression, shear, bending, flexural and lateral-torsional buckling, with full calculation traces

Readme

member-checks

Structural member checks as pure functions over resolved data. v1 implements EN 1993-1-1 (Eurocode 3) steel 1D member checks: tension, compression, shear, bending, flexural buckling, and lateral-torsional buckling — with a complete calculation trace on every result.

The library is deliberately agnostic of any specific program: no FEM engine, no app state, no I/O, zero runtime dependencies. Any tool that can produce cross-section properties and internal forces can run the checks — a FEM application, a spreadsheet-verification script, or a research notebook.

⚠️ Engineering responsibility. This library performs code checks; it does not replace engineering judgment. Verify results independently before using them for design. See Scope and limitations for what v1 explicitly does not check — the library warns loudly about those gaps, read the warnings.

Install

Not yet published to npm. Consume from a sibling checkout while the API settles:

// package.json
{ "dependencies": { "member-checks": "file:../member-checks" } }
npm run build   # emits dist/ consumed via the exports map

Requires an ESM consumer. Entry points: member-checks (re-exports ec3) and member-checks/ec3. (member-checks/ec2 is a placeholder for EN 1992.)

Quick start

Check a simply supported IPE240 / S355 beam, 10 m span, under a uniform load (one load combination):

import { checkMember, resolveSection } from "member-checks/ec3";

const L = 10_000; // mm
const q = 4.77; // N/mm (= kN/m)
const stations = Array.from({ length: 11 }, (_, i) => {
  const x = (i * L) / 10;
  return {
    x,
    N: 0,
    Vy: 0,
    Vz: q * (L / 2 - x), // N
    T: 0,
    My: (q * x * (L - x)) / 2, // N·mm
    Mz: 0,
  };
});

const result = checkMember({
  section: resolveSection({ kind: "I", h: 240, b: 120, tw: 6.2, tf: 9.8, r: 15 }),
  material: { grade: "S355", E: 210_000, G: 80_770 },
  L,
  stations,
  // Boundary conditions are inputs, never derived. Here: the ECCS C-factors
  // used by the SCIA reference report for this case.
  buckling: { C: { C1: 2.58, C2: 1.55, C3: 0.41 } },
  options: { ltbMethod: "rolled", ltbFModification: false }, // match SCIA
});

result.overallUc; // ≈ 0.97 — governed by lateral-torsional buckling
result.status; // "ok"
result.stations; // per-station utilizations, ready for a diagram
result.stability.ltb?.substitution;
// "Mb,Rd = χLT·Wy·fy/γM1 = 0.4723 × 366.6e3 × 355 / 1 = 61.47 kNm; UC = ..."

With the defaults instead (C1 computed from the moment diagram ≈ 1.14, general method) this fully unrestrained 10 m beam fails LTB at UC ≈ 2.3 — which is the point: restraint assumptions dominate LTB, so they are explicit inputs with conservative defaults, and injecting tabulated C-factors is first-class.

Every check returns { uc, status, clause, formula, symbols, substitution, warnings } — report generators, UI tooltips, and diff-based tests all consume the same structure. The library never formats reports, prints, or localizes.

Units and conventions

All inputs and outputs use the coherent N–mm–MPa system (fields are plain numbers; the contract is documented at the top of src/ec3/types.ts):

| Quantity | Unit | | ----------------------------------- | ------------------- | | Length, coordinates x | mm | | Force (N, V) | N | | Moment (M, T) | N·mm | | Stress, strength (fy, fu, E, G) | MPa (N/mm²) | | Area / inertia / modulus / warping | mm², mm⁴, mm³, mm⁶ |

  • Signs: axial N tension-positive; My sagging-positive. Checks use |V|, |M| and the sign of N only.
  • Axes: local y-y is the strong axis (Iy ≥ Iz), per EC3. Violations are reported as warnings, never silently swapped.
  • Forces are one combination at a time. Envelopes are rejected by design: the checks are nonlinear in the forces, so component-wise envelopes mix incompatible states. Loop combinations in your adapter and take the max UC.
  • Calculation traces display forces in kN and moments in kNm; every trace symbol carries its unit string.

API — three layers, all pure

Layer 0 — formula primitives. Number-in/number-out atoms, individually testable against hand calculations: epsilon, chi, ncrFlexural, mcr3Factor, c1FromMomentDiagram, imperfectionFactor, selectBucklingCurve, selectLtbCurve.

Layer 1 — clause checks. One function per clause, taking resolved values and returning a CheckResult with a full trace: checkTension (6.2.3), checkCompression (6.2.4), checkShear (6.2.6), checkBendingY (6.2.5), checkFlexuralBuckling (6.3.1), checkLtb (6.3.2).

Layer 2 — member orchestrator. checkMember(input) resolves defaults, classifies the section, runs the applicable section checks at every station, runs stability checks once per member (max |N|, max |My|, governing class), and assembles a MemberCheckResult with per-station utilizations, the critical station's full traces, and aggregated warnings.

Supporting resolvers: resolveSection (fillet-aware I/RHS/SHS/CHS properties from parametric geometry, with per-field overrides — properties-only sections also flow through, degraded to elastic checks with warnings), resolveSteelMaterial (explicit strengths → thickness-banded table → EN 10025 grade name via Table 3.1), classify (Table 5.2).

Boundary conditions (buckling lengths, LTB effective length factors, warping restraint, load height, C-factors) are inputs with sensible defaults, never derived — no library can know the erection reality. C1 additionally gets a computed default from the station moments themselves.

Scope and limitations

v1 checks (EN 1993-1-1:2005+A1):

| Check | Clause | Notes | | ------------------ | ------- | -------------------------------------------------------- | | Tension | 6.2.3 | Gross section; net-section/fu path deferred | | Compression | 6.2.4 | Class 1–3; class 4 → notChecked + warning | | Shear (both axes) | 6.2.6 | Plastic; slender webs → notChecked + EN 1993-1-5 warning | | Bending (strong) | 6.2.5 | Class 1–2 plastic, class 3 elastic | | Flexural buckling | 6.3.1 | Both axes; Table 6.2 curves, unknown shape → curve d | | LTB | 6.3.2 | 3-factor Mcr; general and rolled cases; SHS/CHS → n/a |

Not checked in v1 (the member result carries a prominent warning when these effects are significant): N+M interaction (6.2.9, 6.3.3) — members with simultaneous significant axial force and bending are not fully verified; weak-axis bending; torsion (6.2.7); torsional/torsional-flexural buckling (6.3.1.4); class 4 effective sections; shear buckling (EN 1993-1-5); SLS deflections. A member that cannot be checked returns status: "notChecked" with a reason — never a silent assumption, never an exception.

National annexes: everything NA-adjustable (partial factors, η, λ̄LT,0, β, the 6.3.2.3(2) f-modification) is a plain parameter with recommended-value defaults.

Validation

  • Section properties tested against producer catalog rows (IPE, HEB, SHS, CHS) with fillet-aware formulas (torsion constant per El Darwish & Johnston), tolerance ≤ 0.5–2%.
  • Classification and resistances reproduce a commercial SCIA Engineer ULS report (IPE240/S355/10 m): Mpl,y,Rd = 130.14 kN·m, Vpl,z,Rd = 392.04 kN, Mcr = 66.25 kN·m, χLT = 0.47, and overall UC = 0.97 end-to-end through checkMember.
  • χ values verified against tabulated buckling curves; property-based invariants (χ ∈ (0, 1], UC monotone in |force|).
npm test        # vitest
npm run typecheck
npm run build

License

MIT