Skip to main content
Home

Built and signed on GitHub Actions

deno module, a collection of math util under dallmo-util

This package works with Node.js, DenoIt is unknown whether this package works with Cloudflare Workers, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
9 months ago (1.2.0)

@dallmo/util-math

overview

  • a collection of math util under dallmo-util, published as deno module.
  • re-written in typescript, migrated from nodejs to base only on deno standard libraries ;
  • published on both deno land and jsr ;

list of methods

  • add_leading_zero
  • random_integer
  • random_integer_array
  • random_sections

usage

1. running on deno, import via deno module

  1. nothing to add via CLI.
  2. create test-via-deno-modules.ts ;
// this assumes the latest version
import * as dallmo_util_math from "https://deno.land/x/dallmo_util_math/mod.ts";

const min: number = 2;
const max: number = 100;

console.log( "random integer : ", dallmo_util_math.random_integer( min, max ) );
  1. run the test file
deno run test-via-deno-modules.ts

2. running on deno, import via jsr

  1. in CLI, add the module with :
deno add @dallmo/util-math
  1. create test-via-jsr.ts ;
import * as dallmo_util_math from "@dallmo/util-math";

const min: number = 2;
const max: number = 100;

console.log( "random integer : ", dallmo_util_math.random_integer( min, max ) );
  1. run the test file
deno run test-via-jsr.ts

test

to run test codes :

  1. switch to the project root folder, i.e. [root]/ ;
  2. run deno task scripts :
  • to test with dependencies via deno modules :
    • run deno task test-deno ;
  • to test with dependencies via jsr :
    • run deno task test-jsr ;
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@dallmo/util-math

Import symbol

import * as util_math from "@dallmo/util-math";
or

Import directly with a jsr specifier

import * as util_math from "jsr:@dallmo/util-math";

Add Package

pnpm i jsr:@dallmo/util-math
or (using pnpm 10.8 or older)
pnpm dlx jsr add @dallmo/util-math

Import symbol

import * as util_math from "@dallmo/util-math";

Add Package

yarn add jsr:@dallmo/util-math
or (using Yarn 4.8 or older)
yarn dlx jsr add @dallmo/util-math

Import symbol

import * as util_math from "@dallmo/util-math";

Add Package

npx jsr add @dallmo/util-math

Import symbol

import * as util_math from "@dallmo/util-math";

Add Package

bunx jsr add @dallmo/util-math

Import symbol

import * as util_math from "@dallmo/util-math";