import { validateDenoLand } from "https://deno.land/x/is_valid_package_name@v1.0.0/deno_land/mod.ts";
Validation for nest.land package name
Examples
Example 1
Example 1
validateDenoLand('is_valid') // [ true, "" ]
validateDenoLand('is-valid') // [ false, "Name contains only the characters a-z, 0-9 and _" ]
Example 2
Example 2
// checkAll
validateDenoLand(" Abc", true); // [ false, ["Name cannot contain leading or trailing spaces", "Name contains only the characters a-z, 0-9 and _" ]]