Socket
Socket
Sign inDemoInstall

is-any-array

Package Overview
Dependencies
0
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 2.0.0

lib-esm/index.d.ts

11

CHANGELOG.md
# Changelog
## [2.0.0](https://www.github.com/cheminfo/is-any-array/compare/v1.0.1...v2.0.0) (2021-10-15)
### ⚠ BREAKING CHANGES
When using this project you will need to use a named import: `import { isAnyArray } from 'is-any-array'`.
### Code Refactoring
* setup project for TypeScript ([#7](https://www.github.com/cheminfo/is-any-array/issues/7)) ([21e47a0](https://www.github.com/cheminfo/is-any-array/commit/21e47a02e36987208b5aa22906c1cbfee3322775))
### [1.0.1](https://www.github.com/cheminfo/is-any-array/compare/v1.0.0...v1.0.1) (2021-06-30)

@@ -4,0 +15,0 @@

22

lib/index.js

@@ -1,11 +0,15 @@

'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isAnyArray = void 0;
const toString = Object.prototype.toString;
function isAnyArray(object) {
return toString.call(object).endsWith('Array]');
/**
* Checks if an object is an instance of an Array (array or typed array).
*
* @param {any} value - Object to check.
* @returns {boolean} True if the object is an array.
*/
function isAnyArray(value) {
return toString.call(value).endsWith('Array]');
}
exports['default'] = isAnyArray;
exports.isAnyArray = isAnyArray;
//# sourceMappingURL=index.js.map
{
"name": "is-any-array",
"version": "1.0.1",
"version": "2.0.0",
"description": "Check if a value is any kind of array",
"main": "lib/index.js",
"module": "src/index.js",
"main": "./lib/index.js",
"module": "./lib-esm/index.js",
"types": "./lib/index.d.ts",
"files": [
"lib",
"lib-esm",
"src"
],
"scripts": {
"check-types": "tsc --noEmit",
"clean": "rimraf lib lib-esm",
"eslint": "eslint src",
"eslint-fix": "npm run eslint -- --fix",
"prepack": "rollup -c",
"test": "npm run test-coverage && npm run eslint",
"prepack": "npm run tsc",
"prettier": "prettier --check src",
"prettier-write": "prettier --write src",
"tsc": "npm run clean && npm run tsc-cjs && npm run tsc-esm",
"tsc-cjs": "tsc --project tsconfig.cjs.json",
"tsc-esm": "tsc --project tsconfig.esm.json",
"test": "npm run test-coverage && npm run eslint && npm run check-types",
"test-coverage": "jest --coverage",

@@ -30,20 +39,12 @@ "test-only": "jest"

"homepage": "https://github.com/cheminfo-js/is-any-array#readme",
"jest": {
"testEnvironment": "node"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.14.5",
"cheminfo-build": "^1.1.11",
"cheminfo-tools": "^1.23.3",
"codecov": "^3.8.2",
"eslint": "^7.29.0",
"eslint-config-cheminfo": "^5.2.4",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jest": "^24.3.6",
"eslint-plugin-prettier": "^3.4.0",
"jest": "^27.0.6",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"rollup": "^2.52.4"
"@types/jest": "^27.0.2",
"eslint": "^8.0.1",
"eslint-config-cheminfo-typescript": "^10.1.1",
"jest": "^27.2.5",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"ts-jest": "^27.0.6",
"typescript": "^4.4.4"
}
}

@@ -16,3 +16,3 @@ # is-any-array

```js
const isAnyArray = require('is-any-array');
const {isAnyArray} = require('is-any-array');

@@ -19,0 +19,0 @@ isAnyArray(1); // false

@@ -1,2 +0,2 @@

import isAnyArray from '..';
import { isAnyArray } from '..';

@@ -3,0 +3,0 @@ test('isArray', () => {

const toString = Object.prototype.toString;
export default function isAnyArray(object) {
return toString.call(object).endsWith('Array]');
/**
* Checks if an object is an instance of an Array (array or typed array).
*
* @param {any} value - Object to check.
* @returns {boolean} True if the object is an array.
*/
export function isAnyArray(value) {
return toString.call(value).endsWith('Array]');
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc