Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ยงFunctions

formatBytes

Formats a number of bytes into a human-readable string.

getDocument

Gets the document for the given target or the global document if no target is provided.

getDocumentElement

Gets a reference to the root node of the document based on the given target.

getId

Generates a unique positive integer.

getWindow

Gets the window object for the given target or the global window object if no target is provided.

isDocument

Checks if the given DOM node is a Document.

isDocumentFragment

Checks if the given DOM node is a DocumentFragment.

isElement

Checks if the given DOM node is an Element.

isElementLike

Checks if an unknown value is likely a DOM element.

isHTMLElement

Checks if the given DOM node is an HTMLElement.

isMathMLElement

Checks if the given DOM node is an MathMLElement.

isNodeLike

Checks if an unknown value is likely a DOM node.

isObject

Checks if the given value is an object.

isShadowRoot

Checks if the given DOM node is a ShadowRoot.

isSVGElement

Checks if the given DOM node is an SVGElement.

isTextNode

Checks if the given DOM node is a Text node.

isWindowLike

Checks if the given value is likely a Window object.

once

Creates a function that will only execute the provided function once. Subsequent calls will return the cached result from the first execution.

sleep

Sleep for a given number of milliseconds.