Skip to main content
Module

x/johnny_decimal/mod.ts>DirectoryCore

Utilities for interacting with a Johnny Decimal filing system.
Go to Latest
class DirectoryCore
Re-export
import { DirectoryCore } from "https://deno.land/x/johnny_decimal@1.1.1/mod.ts";

Examples

class Directory extends DirectoryCore { constructor($JD_HOME){ this.$JD_HOME = $JD_HOME; } } const directory = new DirectoryCore() directory.registerCommand({ name: "log-home", fn: () => { console.log(this.$JD_HOME) } }); directory.runCommand("log-home");

Properties

commands: Record<string, any>

Methods

private
retrieveCommand(commandName: string)
hasCommand(name: string): boolean
registerAlias(commandName: string, aliasNames?: string[]): void
registerCommand(command: Command): void
runCommand(commandName: string, args: string[])