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

jgeometry

v1.0.2

Published

A high-performance geometric calculation utility library for 2D and 3D shapes.

Readme

jGeometry

How to Install it-->

Pop open your terminal and run:

npm install jgeometry

How to Use it

It’s designed to be super easy to read and highly optimized. Just import it and call what you need:

import jgeometry from 'jgeometry';

// Or import just a specific category file to keep your app bundle tiny! // import * as area from 'jgeometry/area';

const equilateralTriangleArea = jgeometry.area.eqtriangle(3); console.log(equilateralTriangleArea);

const circleArea = jgeometry.area.circle(5); console.log(circleArea);

const rightTriangleArea = jgeometry.area.rightTriangle(10, 5); console.log(rightTriangleArea);

const rectanglePerimeter = jgeometry.perimeter.rectangle(10, 5); console.log(rectanglePerimeter);

const cylinderVolume = jgeometry.volume.cylinder(3, 7); console.log(cylinderVolume);

const capsuleVolume = jgeometry.volume.capsule(3, 8); console.log(capsuleVolume);

const sphereSurfaceArea = jgeometry.surfaceArea.sphere(4); console.log(sphereSurfaceArea);

What it can do right now:

Area Calculations (jgeometry/area) jgeometry.area.eqtriangle(side) - Area of an equilateral triangle. jgeometry.area.isostriangle(side, base) - Area of an isosceles triangle. jgeometry.area.scaletriangle(a, b, c) - Area of a scalene triangle using Heron's formula. jgeometry.area.square(side) - Area of a square. jgeometry.area.rectangle(length, width) - Area of a rectangle. jgeometry.area.circle(radius) - Area of a circle. jgeometry.area.parallelogram(base, height) - Area of a parallelogram. jgeometry.area.trapezoid(base1, base2, height) - Area of a trapezoid. jgeometry.area.rhombus(diagonal1, diagonal2) - Area of a rhombus. jgeometry.area.ellipse(semiMajorAxis, semiMinorAxis) - Area of an ellipse. jgeometry.area.regularPolygon(sides, length) - Area of any regular polygon. jgeometry.area.sector(radius, angleInDegrees) - Area of a circle sector. jgeometry.area.segment(radius, angleInDegrees) - Area of a circular segment. jgeometry.area.annulus(outerRadius, innerRadius) - Area of an annulus (ring). jgeometry.area.kite(diagonal1, diagonal2) - Area of a kite shape. jgeometry.area.cyclicQuadrilateral(a, b, c, d) - Area of a cyclic quadrilateral. jgeometry.area.archimedeanSpiralSector(a, b, theta1, theta2) - Area of an Archimedean spiral sector. jgeometry.area.ellipseSector(semiMajorAxis, semiMinorAxis, angleInDegrees) - Area of an ellipse sector. jgeometry.area.regularHexagon(side) - Area of a regular hexagon. jgeometry.area.regularPentagon(side) - Area of a regular pentagon. jgeometry.area.regularOctagon(side) - Area of a regular octagon. jgeometry.area.regularDecagon(side) - Area of a regular decagon. jgeometry.area.rightTriangle(base, height) - Area of a right-angled triangle. jgeometry.area.parabolaSegment(base, height) - Area of a parabolic segment.

Perimeter Calculations (jgeometry/perimeter) jgeometry.perimeter.eqtriangle(side) - Perimeter of an equilateral triangle. jgeometry.perimeter.isostriangle(side, base) - Perimeter of an isosceles triangle. jgeometry.perimeter.scaletriangle(a, b, c) - Perimeter of a scalene triangle. jgeometry.perimeter.square(side) - Perimeter of a square. jgeometry.perimeter.rectangle(length, width) - Perimeter of a rectangle. jgeometry.perimeter.circle(radius) - Circumference of a circle. jgeometry.perimeter.parallelogram(sideA, sideB) - Perimeter of a parallelogram. jgeometry.perimeter.trapezoid(a, b, c, d) - Perimeter of a trapezoid. jgeometry.perimeter.rhombus(side) - Perimeter of a rhombus. jgeometry.perimeter.ellipse(semiMajorAxis, semiMinorAxis) - Perimeter approximation of an ellipse. jgeometry.perimeter.regularPolygon(sides, length) - Perimeter of any regular polygon. jgeometry.perimeter.sector(radius, angleInDegrees) - Perimeter of a circle sector. jgeometry.perimeter.segment(radius, angleInDegrees) - Perimeter of a circular segment. jgeometry.perimeter.annulus(outerRadius, innerRadius) - Combined perimeter boundaries of an annulus. jgeometry.perimeter.kite(side1, side2) - Perimeter of a kite shape. jgeometry.perimeter.cyclicQuadrilateral(a, b, c, d) - Perimeter of a cyclic quadrilateral. jgeometry.perimeter.regularHexagon(side) - Perimeter of a regular hexagon. jgeometry.perimeter.regularPentagon(side) - Perimeter of a regular pentagon. jgeometry.perimeter.regularOctagon(side) - Perimeter of a regular octagon. jgeometry.perimeter.regularDecagon(side) - Perimeter of a regular decagon. jgeometry.perimeter.rightTriangle(base, height) - Perimeter of a right-angled triangle.

Volume Calculations (jgeometry/volume) jgeometry.volume.cube(side) - Volume of a cube. jgeometry.volume.cuboid(length, width, height) - Volume of a cuboid. jgeometry.volume.cylinder(radius, height) - Volume of a cylinder. jgeometry.volume.sphere(radius) - Volume of a sphere. jgeometry.volume.cone(radius, height) - Volume of a cone. jgeometry.volume.pyramid(baseArea, height) - Volume of a pyramid. jgeometry.volume.hemisphere(radius) - Volume of a hemisphere. jgeometry.volume.ellipsoid(a, b, c) - Volume of an ellipsoid. jgeometry.volume.triangularPrism(base, triangleHeight, prismHeight) - Volume of a triangular prism. jgeometry.volume.hexagonalPrism(side, height) - Volume of a hexagonal prism. jgeometry.volume.pentagonalPrism(side, height) - Volume of a pentagonal prism. jgeometry.volume.octagonalPrism(side, height) - Volume of an octagonal prism. jgeometry.volume.torus(majorRadius, minorRadius) - Volume of a torus (donut shape). jgeometry.volume.coneFrustum(radius1, radius2, height) - Volume of a truncated cone. jgeometry.volume.pyramidFrustum(baseArea1, baseArea2, height) - Volume of a truncated pyramid. jgeometry.volume.sphericalCap(radius, height) - Volume of a spherical cap. jgeometry.volume.sphericalSector(radius, height) - Volume of a spherical sector. jgeometry.volume.capsule(radius, cylinderHeight) - Volume of a capsule. jgeometry.volume.obelisk(length1, width1, length2, width2, height) - Volume of an obelisk. jgeometry.volume.wedge(length, width, height, slantHeight) - Volume of a geometric wedge.

Surface Area Calculations (jgeometry/surfaceArea) jgeometry.surfaceArea.cube(side) - Total surface area of a cube. jgeometry.surfaceArea.cuboid(length, width, height) - Total surface area of a cuboid. jgeometry.surfaceArea.cylinder(radius, height) - Total surface area of a cylinder. jgeometry.surfaceArea.sphere(radius) - Total surface area of a sphere. jgeometry.surfaceArea.cone(radius, slantHeight) - Total surface area of a cone. jgeometry.surfaceArea.hemisphere(radius) - Total surface area of a hemisphere. jgeometry.surfaceArea.ellipsoid(a, b, c) - Surface area approximation of an ellipsoid. jgeometry.surfaceArea.triangularPrism(base, triangleHeight, sideA, sideB, prismHeight) - Total surface area of a triangular prism. jgeometry.surfaceArea.hexagonalPrism(side, height) - Total surface area of a hexagonal prism. jgeometry.surfaceArea.pentagonalPrism(side, height) - Total surface area of a pentagonal prism. jgeometry.surfaceArea.octagonalPrism(side, height) - Total surface area of an octagonal prism. jgeometry.surfaceArea.torus(majorRadius, minorRadius) - Total surface area of a torus. jgeometry.surfaceArea.coneFrustum(radius1, radius2, slantHeight) - Total surface area of a truncated cone. jgeometry.surfaceArea.pyramidFrustum(baseArea1, baseArea2, perimeter1, perimeter2, slantHeight) - Total surface area of a truncated pyramid. jgeometry.surfaceArea.sphericalCap(radius, height) - Total surface area of a spherical cap. jgeometry.surfaceArea.capsule(radius, cylinderHeight) - Total surface area of a capsule. jgeometry.surfaceArea.squarePyramid(side, slantHeight) - Total surface area of a square pyramid.

License ISC — Feel free to use it in any of your projects!