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

§Classes

Counter

A map that counts occurrences of keys.

DefaultMap

A map that automatically creates values for missing keys using a factory function.

DefaultWeakMap

A weak map that automatically creates values for missing keys using a factory function.

WeakCounter

A weak map that counts occurrences of object keys.

§Variables

supportsRegexLookbehind

Checks if current environment supports regex lookbehind assertion.

§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.

isDeepEqual

Whether two values are deeply equal.

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.

isMap

Checks if the given value is a Map.

isMathMLElement

Checks if the given DOM node is an MathMLElement.

isNodeLike

Checks if an unknown value is likely a DOM node.

isNotNullish

Returns true if the given value is not null or undefined.

isObject

Checks if the given value is an object.

isSet

Checks if the given value is a Set.

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.

mapGroupBy

A polyfill for the Map.groupBy() static method.

mapValues

Creates a new object with the same keys as the input object, but with values transformed by the provided callback function. Similar to Array.prototype.map() but for object values.

objectEntries

A type-safe wrapper around Object.entries() that preserves the exact types of object keys and values. Unlike the standard Object.entries() which returns [string, any][], this function returns an array of tuples where each tuple is precisely typed according to the input object's structure.

objectGroupBy

A polyfill for the Object.groupBy() static method.

once

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

sleep

Returns a Promise that resolves after a specified number of milliseconds.

§Type Aliases

ObjectEntries

A TypeScript utility type that represents the entries of an object as a union of tuple types. Each tuple contains a key-value pair where the key and value types are precisely typed according to the input object type.