as-typed-array
Make any value an array, and maintain types
Last updated 6 years ago by bconnorwhite .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install as-typed-array 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.0                                ...           latest (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |