Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/satyarohith/cardinal
A Deno module to get compass direction (16 directions) from degree.
https://github.com/satyarohith/cardinal
cardinal compass deno module wind-direction
Last synced: 12 days ago
JSON representation
A Deno module to get compass direction (16 directions) from degree.
- Host: GitHub
- URL: https://github.com/satyarohith/cardinal
- Owner: satyarohith
- License: mit
- Created: 2020-12-14T14:43:53.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-21T09:23:17.000Z (almost 4 years ago)
- Last Synced: 2024-11-15T20:24:10.050Z (about 1 month ago)
- Topics: cardinal, compass, deno, module, wind-direction
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Cardinal
![ci](https://github.com/satyarohith/cardinal/actions/workflows/ci.yml/badge.svg)
Get direction for the provided degree based on a 16-point compass rose.
```ts
import { getDirection } from "https://deno.land/x/cardinal/mod.ts";
console.log(getDirection(135)); // SE
console.log(getDirection(135, { long: true })); // southeast
```[MIT](LICENSE) License.