@ilihub/cuboid
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@ilihub/cuboid

A collection of useful TypeScript functions for cuboid related operations.

NPM Version NPM CodeFactor Socket Badge

Installation

# if you're using pnpm
pnpm add @ilihub/cuboid

# or, if you're using npm
npm install @ilihub/cuboid

# or, if you're using yarn
yarn add @ilihub/cuboid

Usage

import { Cuboid } from "@ilihub/cuboid";

const length = 10;
const width = 20;
const height = 30;

const cuboid = new Cuboid(length, width, height);

const lateralSurfaceArea = cuboid.lateralSurfaceArea();
console.log(lateralSurfaceArea); // 1800

const perimeter = cuboid.perimeter();
console.log(perimeter); // 240

const surfaceArea = cuboid.surfaceArea();
console.log(surfaceArea); // 2200

const totalSurfaceArea = cuboid.totalSurfaceArea();
console.log(totalSurfaceArea); // 2200

const volume = cuboid.volume();
console.log(volume); // 6000

Available Functions and Classes


Sponsors & Backers

Support the development of new open-source projects from ilihub through crowdfunding.

The core of ilihub is our crowd-funded open-source projects, licensed under the permissive MIT license. Sponsorship increases the rate of bug fixes, documentation improvements, and feature development.

Sponsors


Package Sidebar

Install

npm i @ilihub/cuboid

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

9.93 kB

Total Files

5

Last publish

Collaborators

  • harshraj8843