1.0.2 • Published 3 years ago

sarana v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

SaranaJS

Open Source JS & TS Utility Package

Note: This project will slowly be expanded over time

Installation

Using npm

npm i sarana

Usage

Example 1: isNumber

Javascript

const { isNumber } = require("sarana");

console.log(isNumber(7.2));     // -> true
console.log(isNumber({}));      // -> false

Typescript

import { isNumber } from "sarana";

console.log(isNumber(42));      // -> true
console.log(isNumber("foo"));   // -> false

Example 2: mapNum

Javascript

const { mapNum } = require("sarana");

console.log(mapNum(1, 0, 2, 0, 1)); // -> 0.5

Typescript

import { mapNum } from "sarana";

console.log(mapNum(1, 0, 2, 0, 1)); // -> 0.5
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago