array-types

Get the types of values in an array

Usage no npm install needed!

<script type="module">
  import arrayTypes from 'https://cdn.skypack.dev/array-types';
</script>

README

array-types

Get the types of values in an array

Installation

npm install array-types

Usage

var types = require('array-types');

types(['one', 'two', 'three']); // => 'string'
types([1, 2, 3]); // => 'number'
types(['one', 2, null]); // => ['string', 'number', 'null']

License

MIT © Geoff Kimball