JSPM

as-typed-array

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14
  • Score
    100M100P100Q55957F
  • License MIT

Make any value an array, and maintain types

Package Exports

  • as-typed-array

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (as-typed-array) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

as-typed-array

npm typescript GitHub stars Twitter Follow

Make any value an array, and maintain types.

Installation

yarn add as-typed-array
npm install as-typed-array

API

Usage

import asArray from "as-typed-array";

asArray(["ok"]); // ["ok"]

asArray("ok"); // ["ok"]

asArray({ ok: true }); // [{ ok: true }]

asArray(undefined); // [];

Types

import asArray from "as-typed-array";

function asArray<T>(any: (T | T[])): T[]

Dev DependenciesDavid


License license

MIT