Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/hex/src/fw/web/deps.ts

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Go to Latest
import * as hex from "https://deno.land/x/hex@0.6.3/src/fw/web/deps.ts";

Namespaces

A library of assertion functions. If the assertion is false an AssertionError will be thrown which will result in pretty-printed diff of failing assertion.

Helpers for working with the filesystem.

Utilities for working with OS-specific file paths.

Enums

Platform-specific conventions for the line ending format (i.e., the "end-of-line").

Functions

Make an assertion, error will be thrown if expr does not have truthy value.

Make an assertion that actual and expected are almost equal numbers through a given tolerance. It can be used to take into account IEEE-754 double-precision floating-point representation limitations. If the values are not almost equal then throw.

Make an assertion that actual includes the expected values. If not then an error will be thrown.

Make an assertion that actual and expected are equal, deeply. If not deeply equal, then throw.

Make an assertion that actual is not null or undefined. If not then throw.

Make an assertion that obj is an instance of type. If not then throw.

Make an assertion that error is an Error. If not then an error will be thrown. An error class and a string that should be included in the error message can also be asserted.

Make an assertion that actual match RegExp expected. If not then throw.

Make an assertion that actual and expected are not equal, deeply. If not then throw.

Make an assertion that obj is not an instance of type. If so, then throw.

Make an assertion that actual not match RegExp expected. If match then throw.

Make an assertion that actual and expected are not strictly equal. If the values are strictly equal then throw.

Make an assertion that actual object is a subset of expected object, deeply. If not, then throw.

Executes a function which returns a promise, expecting it to reject.

Make an assertion that actual and expected are strictly equal. If not then throw.

Make an assertion that actual includes expected. If not then throw.

Executes a function, expecting it to throw. If it does not, then it throws.

Deep equality comparison used in assertions

Forcefully throws a failed assertion

Use this to stub out methods that will throw when invoked.

Use this to assert unreachable code.

Copy a file or directory. The directory can have contents. Like cp -r. Requires the --allow-read and --allow-write flag.

Copy a file or directory. The directory can have contents. Like cp -r. Requires the --allow-read and --allow-write flag.

Detect the EOL character for string input. returns null if no newline.

Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. Requires the --allow-read and --allow-write flag.

Ensures that a directory is empty. Deletes directory contents if the directory is not empty. If the directory does not exist, it is created. The directory itself is not deleted. Requires the --allow-read and --allow-write flag.

Ensures that the directory exists. If the directory structure does not exist, it is created. Like mkdir -p. Requires the --allow-read and --allow-write flag.

Ensures that the directory exists. If the directory structure does not exist, it is created. Like mkdir -p. Requires the --allow-read and --allow-write flag.

Ensures that the file exists. If the file that is requested to be created is in directories that do not exist. these directories are created. If the file already exists, it is NOTMODIFIED. Requires the --allow-read and --allow-write flag.

Ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is NOT MODIFIED. Requires the --allow-read and --allow-write flag.

Ensures that the hard link exists. If the directory structure does not exist, it is created.

Ensures that the hard link exists. If the directory structure does not exist, it is created.

Ensures that the link exists. If the directory structure does not exist, it is created.

Ensures that the link exists. If the directory structure does not exist, it is created.

f
fs.exists
deprecated

Test whether or not the given path exists by checking with the file system.

f
fs.existsSync
deprecated

Test whether or not the given path exists by checking with the file system.

Expand the glob string from the specified root directory and yield each result as a WalkEntry object.

Synchronous version of expandGlob().

Format the file to the targeted EOL.

Moves a file or directory.

Moves a file or directory synchronously.

Walks the file tree rooted at root, yielding each file or directory in the tree filtered according to the given options.

Same as walk() but uses synchronous ops

Determines the common path from a set of paths, using an optional separator, which defaults to the OS default separator.

Convert a glob string to a regular expression.

Test whether the given string is a glob

Like join(), but doesn't collapse "**/.." when globstar is true.

Like normalize(), but doesn't collapse "**/.." when globstar is true.

Interfaces

A parsed path object generated by path.parse() or consumed by path.format().