- a simple function to search in array, return an array of strings ;
- published on both deno land and jsr ;
-
nothing to add via CLI.
-
create a file
test-via-deno-modules.ts
import { array_search } from "https://deno.land/x/dallmo_array_search/mod.ts";
const test_array: any[] = ["aa", "abc", "a a", "b b", 123123, "123cc", "真係", "真 係 乜","唔係"];
const search_string: string = "a";
const search_result: string[] = await array_search( test_array, search_string );
console.log( search_result );
- run the test file
deno run test-via-deno-modules.ts
- in CLI, add the module with :
deno add @dallmo/array-search
- create a file
test-via-jsr.ts
import { array_search } from "@dallmo/array-search";
const test_array: any[] = ["aa", "abc", "a a", "b b", 123123, "123cc", "真係", "真 係 乜","唔係"];
const search_string: string = "a";
const search_result: string[] = await array_search( test_array, search_string );
console.log( search_result );
- run the test file
deno run test-via-jsr.ts
just run
deno test