Skip to main content
Module

x/is_valid_package_name/deps.ts>entries

Validation for package name
Latest
variable entries
import { entries } from "https://deno.land/x/is_valid_package_name@v1.0.0/deps.ts";

Returns an array of key/values of the enumerable properties of an object.

Examples

Example 1

entries({ a: 'b' }) // [['a', 'b']]
entries(['a', 'b', 'c']) // [['0', 'a'], ['1', 'b'], ['2', 'c']]
entries({}) // []
entries([]) // []

type

{ <T>(val: { [key: string]: T; } | ArrayLike<T>): [string, T][]; (val: Record<string, unknown>): [string, unknown][]; }