New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@yag/is-array

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yag/is-array

Just a fallback for Array.isArray()

latest
Source
npmnpm
Version
1.4.0
Version published
Weekly downloads
9
200%
Maintainers
1
Weekly downloads
 
Created
Source

@yag/is-array

License GitHub tag npm version Build Status Coveralls github Dependencies Status Known Vulnerabilities

Copyright (c) 2017 - 2018, Yassel Avila Gil.

What is this?

Just a fallback for Array.isArray()

License

New BSD License. See LICENSE.txt.

Documentation

This library includes type definitions for TypeScript.

Installation

@yag/is-array is available for Node.js on npm. To install it, type:

npm install -P @yag/is-array

If you need support for older browsers, check usage.

Usage

TypeScript:
import isArray from '@yag/is-array';

const t1: any = [1, 2, 3];
const t2: any = new Date();

console.log(isArray(t1)); // true
console.log(isArray(t2)); // false
ES6+:
const { isArray } = require('@yag/is-array');

const t1 = [1, 2, 3];
const t2 = new Date();

console.log(isArray(t1)); // true
console.log(isArray(t2)); // false
JavaScript (ES5 / CommonJS):
var isArray = require('@yag/is-array').isArray;

var t1 = [1, 2, 3];
var t2 = new Date();

console.log(isArray(t1)); // true
console.log(isArray(t2)); // false
Directly in (legacy?) browsers:
<!-- ~639 bytes gzipped / ~563 bytes if you use Brotli ;-) -->
<script src="/node_modules/@yag/is-array/bundles/isarray.umd.bundle.js"></script>
<script>

  var t1 = [1, 2, 3];
  var t2 = new Date();

  console.log(isArray(t1)); // true
  console.log(isArray(t2)); // false

</script>

Keywords

array

FAQs

Package last updated on 29 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts