v1.1.0
a collection of utils in various categories
Attributes
Includes Deno configuration
Repository
Current version released
2 years ago
Dependencies
deno.land/x
std
Versions
@dallmo/util
overview
list of methods
- add_leading_zero
- random_integer
- random_sections
usage
1. running on deno, import via deno module
- nothing to add via CLI.
- create
test-via-deno-modules.ts;
import * as dallmo_util from "https://deno.land/x/dallmo_util@v1.0.0/mod.ts";
// test the math child module
const min: number = 2;
const max: number = 100;
console.log( "random integer : ", dallmo_util.math.random_integer( min, max ) );
// test the array child module
const test_array: any[] = ["123","abc", 456, "何ですか"];
console.log( "random_item : ", dallmo_util.array.random_item( test_array ) );- run the test file
deno run test-via-deno-modules.ts2. running on deno, import via jsr
- in CLI, add the module with :
deno add @dallmo/util- create
test-via-jsr.ts;
import * as dallmo_util from "jsr:@dallmo/util";
// test the math child module
const min: number = 2;
const max: number = 100;
console.log( "random integer : ", dallmo_util.math.random_integer( min, max ) );
// test the array child module
const test_array: any[] = ["123","abc", 456, "何ですか"];
console.log( "random_item : ", dallmo_util.array.random_item( test_array ) );- run the test file
deno run test-via-jsr.tstest
to run test codes :
- switch to the project root folder, i.e.
[root]/; - run deno task scripts :
- to test with dependencies via deno modules :
- run
deno task test-deno;
- run
- to test with dependencies via jsr :
- run
deno task test-jsr;
- run