Deno supports only ES6 modules, no CommonJS "require" modules. Main module repository: https://deno.land/x For interpreter line need something like: #!/usr/bin/env -S deno run -A # permissive, or more securely... #!/usr/bin/env -S deno run --allow-read --allow-write --allow-net --allow-env etc. deno run --help | grep -- --allow Looks like no env var support for most things, but you can use default config file "deno.json" or use -c switch with another config file. It can execute legacy JavaScript in addition to Typescript. Looks like there's good built-in HTTP client capabilities with async function fetch. https://examples.deno.land/http-requests It takes params of: string URL + options object OR Request object. Request constructor takes string URL + options object just like 1st form of fetch(). options can set things like method header bodyint8Array, Blob, URLSearchParam, FormData, ReadableStream No keepalive option. This article explains how to set HTTP params and other things: https://medium.com/deno-the-complete-reference/a-comprehensive-guide-to-http-clients-in-deno-ab5589896f2c To get an object from body JSON, call: await response.json() Failures unfortunately throw TypeErrors, so difficult to handle. At least messages very useful. No convenient Timeout ability. Must use an AbortController with a setTimeout (GOTCHA: Can't re-use AbortController instances) Throws an "AbortError" Error which IS NOT instanceof AbortError. deno eval... has -A behavior and is just like: node -e... node eval -p... SUCKS! It just wraps a console.print() around the provided code. That's lame compared to node's -p switch. stdin/stdout: See code-templates/deno/slurp.js and code-templates/deno/myUtils.js Text Files. Deno.readTextFileSync(filePath) Deno.writeTextFileSync(filePath, text[, {append:bool, create: bool, createNew: bool, mode: n}]) File/directory existence: import { existsSync } from "https://deno.land/std@0.204.0/fs/mod.ts"; const isReadableDir = existsSync("./foo", { isReadable: true, isDirectory: true // OR isFile: true }); Package organization: Repo can have multiple packages which can have multiple modules. But releases are based on GitHub webhooks which are specific to the GitHub module. Therefore I think for sanity do 1 GitHub project = 1 Deno module. Hook does not work when I set a Subdirectory. Does deno "Subdirectory" setting in add_module page mean that URL would be like https://deno.land/x/denoplay/sub/dir/index.js rather than https://deno.land/x/denoplay/index.js ? You can specify a subdirectory in the webhook, so one repos can contain multiple deno packages. LIMIT 3! Since every deno module URL ends in the file, one package can provide multiple modules. LIMIT 15 total for a GitHub account/org. WTF? Can request increase in quota. Env vars: Deno.env.get("VARNAME"), Deno.env.set("nm", "val") Plain map: Den.env.toObject(); Args/CLI params: Deno.args Standard library has a format function and a sprintf function, but neither does coloring automatically. Apparently would need to use the colors function to color manually. The format function uses {0} placeholders like Java's format. Very different from nodejs format. sprintf is like a completed version of nodejs util.format EXCEPT format will just concatenate params too like: util.format("one", "two", "three") There is also printf which outputs to stdout as alternative (apparently non-truncating) to console. I see no core isPlainObject but there are some third party libs with it. Publishing ---------- Repo module inspector: https://docs.deno.com/runtime/manual/tools/dependency_inspector Like: deno info https://deno.land/x/yargs/deno.ts but fails for deno info https://deno.land/x/denoplay/index.js There are alternative ways, but most easy is to automatically release for every Github tag push. https://deno.com/add_module Instructions are excellent, but de-select 'Which events...' Pushes. The deno add_module page reported module registration success from the first hook ping but in fact it did not succeed even after pushing a tag. I recommend waiting a good while between adding the hook and pushing first tag. If that doesn't work then wait a while and push another tag. TODO: Update here after test by creating another deno package. Does not appear in repository until you Create a tag: git tag -a -m 'Releasing package.json version 1.0.0' 'DENO_VERSION' (Where I have DENO_VERSION is the actual tag name. The version in denoland will be exactly this. git push --tags BUT normally will tag with 'npm version x" and this creates tags of format "v2.2.1" then: git push origin v2.2.1 ---------- Possible bycontract replacements: jason. jason.testfns...).validate(val).tryThrowErrors(); supported types: https://deno.land/x/jason@0.1.3/mod.ts no OOTB support to allow nulls or undefineds HOW TO EXTEND??? is_valid has a bunch of isá¹®ests that can be aggregated with compositor functions like everyTrue, someFalse, falseThen HOW TO EXTEND??? ok_computer: Looks very extensible. Available for Node too. need to run isError on the validator return value (because some higher-order tests return non-undefined). Aggregator functions like and or. TODO: Check 'undef'. Is it a function or what??? FAVORITE: garn-validator MOST POPULAR: Zod x/xml looks most popular for XML parsing deno_dom is wildly popular for HTML and DOM parsing. Very poorly documented. Element docOrEl.querySelector[All] take CSS selectors, getElementById, getElementsBy{Class|Tag}Name Undocumented string Element.tagName Deno.exit(1); Ignore SSL/TLS cert errors: --unsafely-ignore-certificate-errors (in same position as -A switch) TESTING https://docs.deno.com/runtime/manual/basics/testing/ For nested tests you have to use Steps with async and awaits. assertion equals params usual order: (actual, expected, message). Same as mocha assertions. Update (unqualified) module dependencies: deno cache --reload[=https://a,https://b] script.js