# @ilihub/shape

> A collection of useful TypeScript functions and utilities for mathematical operations on geometric shapes.

Latest version **1.0.10** (published 2023-11-01) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @ilihub/shape
pnpm add @ilihub/shape
yarn add @ilihub/shape
bun add @ilihub/shape
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2023-11-01 |
| First published | 2023-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ilihub |
| Maintainers | harshraj8843 |
| Keywords | ilihub, code, math, geometry, shape, triangle, circle, cone, cube, cuboid, cylinder, semi-circle, rectangle, parallelogram, square, rhombus, sphere, tools, typescript, functions, utils |

## Links

- npm: https://www.npmjs.com/package/@ilihub/shape
- Repository: https://github.com/ilihub/npm
- Homepage: https://code.ilihub.tech
- Issues: https://github.com/ilihub/npm/issues
- Funding: https://opencollective.com/ilihub
- npm.io page: https://npm.io/package/@ilihub/shape

## Dependencies (12)

- [@ilihub/cone](https://npm.io/package/@ilihub/cone.md) 1.0.1
- [@ilihub/cube](https://npm.io/package/@ilihub/cube.md) 1.0.3
- [@ilihub/circle](https://npm.io/package/@ilihub/circle.md) 1.0.4
- [@ilihub/cuboid](https://npm.io/package/@ilihub/cuboid.md) 1.0.1
- [@ilihub/sphere](https://npm.io/package/@ilihub/sphere.md) 1.0.3
- [@ilihub/square](https://npm.io/package/@ilihub/square.md) 1.0.3
- [@ilihub/rhombus](https://npm.io/package/@ilihub/rhombus.md) 1.0.3
- [@ilihub/cylinder](https://npm.io/package/@ilihub/cylinder.md) 1.0.1
- [@ilihub/triangle](https://npm.io/package/@ilihub/triangle.md) 1.0.4
- [@ilihub/rectangle](https://npm.io/package/@ilihub/rectangle.md) 1.0.3
- [@ilihub/semi-circle](https://npm.io/package/@ilihub/semi-circle.md) 1.0.4
- [@ilihub/parallelogram](https://npm.io/package/@ilihub/parallelogram.md) 1.0.3

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.10 (latest) — 2023-11-01
- 1.0.9 — 2023-10-06
- 1.0.8 — 2023-10-06
- 1.0.7 — 2023-10-03
- 1.0.6 — 2023-09-29
- 1.0.5 — 2023-09-27
- 1.0.4 — 2023-09-26
- 1.0.3 — 2023-09-25
- 1.0.2 — 2023-09-24
- 1.0.1 — 2023-09-24
- 1.0.0 — 2023-09-24

## README

# @ilihub/shape

A collection of useful TypeScript functions and utilities for mathematical operations on geometric shapes.

![NPM Version](https://img.shields.io/npm/v/%40ilihub%2Fshape?color=33cd56&logo=npm)
![NPM](https://img.shields.io/npm/l/%40ilihub%2Fshape)
[![CodeFactor](https://www.codefactor.io/repository/github/ilihub/npm/badge)](https://www.codefactor.io/repository/github/ilihub/npm)
[![Socket Badge](https://socket.dev/api/badge/npm/package/@ilihub/shape)](https://socket.dev/npm/package/@ilihub/shape)

## Installation

```bash
# if you're using pnpm
pnpm add @ilihub/shape

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

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

## Usage

```javascript
import { Triangle } from "@ilihub/shape";

const s1 = 6;
const s2 = 5;
const s3 = 4;

const triangle = new Triangle(s1, s2, s3);

const area = triangle.area();
console.log(area); // 9.921567416492215

const perimeter = triangle.perimeter();
console.log(perimeter); // 15
```

## Available Functions and Classes

- [Circle](https://www.npmjs.com/package/@ilihub/circle)
- [Cone](https://www.npmjs.com/package/@ilihub/cone)
- [Cube](https://www.npmjs.com/package/@ilihub/cube)
- [Cuboid](https://www.npmjs.com/package/@ilihub/cuboid)
- [Cylinder](https://www.npmjs.com/package/@ilihub/cylinder)
- [Parallelogram](https://www.npmjs.com/package/@ilihub/parallelogram)
- [Rectangle](https://www.npmjs.com/package/@ilihub/rectangle)
- [Rhombus](https://www.npmjs.com/package/@ilihub/rhombus)
- [Semi Circle](https://www.npmjs.com/package/@ilihub/semi-circle)
- [Sphere](https://www.npmjs.com/package/@ilihub/sphere)
- [Square](https://www.npmjs.com/package/@ilihub/square)
- [Triangle](https://www.npmjs.com/package/@ilihub/triangle)

---

<!-- sponsors_and_backers_section_start -->

<!-- Please do not edit/update this section manually, it is automatically generated by the `sponsors.yml` workflow -->

## 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](https://raw.githubusercontent.com/ilihub/sponsors/sponsors/sponsors.svg)

<!-- sponsors_and_backers_section_end -->

---

---
_Source: https://npm.io/package/@ilihub/shape · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
