is-any-array 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/History.md CHANGED
@@ -1,3 +1,7 @@
1
+ # [0.1.0](https://github.com/cheminfo-js/is-any-array/compare/v0.0.3...v0.1.0) (2020-02-25)
2
+
3
+
4
+
1
5
  <a name="0.0.3"></a>
2
6
  ## [0.0.3](https://github.com/cheminfo-js/is-any-array/compare/v0.0.2...v0.0.3) (2018-10-26)
3
7
 
package/lib/index.js ADDED
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const toString = Object.prototype.toString;
6
+
7
+ function isAnyArray(object) {
8
+ return toString.call(object).endsWith('Array]');
9
+ }
10
+
11
+ exports.default = isAnyArray;
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "is-any-array",
3
- "version": "0.0.3",
3
+ "version": "0.1.0",
4
4
  "description": "Check if toString.call ends with Array",
5
- "main": "./src/index.js",
5
+ "main": "lib/index.js",
6
+ "module": "src/index.js",
6
7
  "files": [
8
+ "lib",
7
9
  "src"
8
10
  ],
9
11
  "scripts": {
10
12
  "eslint": "eslint src",
11
13
  "eslint-fix": "npm run eslint -- --fix",
14
+ "prepublishOnly": "rollup -c",
12
15
  "test": "run-s testonly eslint",
13
16
  "test-travis": "eslint src && jest --coverage && codecov",
14
17
  "testonly": "jest",
15
- "build": "cheminfo build"
18
+ "build": "cheminfo-build --entry src/index.js"
16
19
  },
17
20
  "repository": {
18
21
  "type": "git",
@@ -29,13 +32,20 @@
29
32
  "testEnvironment": "node"
30
33
  },
31
34
  "devDependencies": {
32
- "cheminfo-tools": "^1.21.1",
33
- "codecov": "^3.1.0",
34
- "eslint": "^5.7.0",
35
- "eslint-config-cheminfo": "^1.18.0",
36
- "eslint-plugin-import": "^2.14.0",
37
- "eslint-plugin-jest": "^21.26.1",
38
- "jest": "^23.6.0",
39
- "npm-run-all": "^4.1.3"
35
+ "@babel/plugin-transform-modules-commonjs": "^7.8.3",
36
+ "cheminfo-build": "^1.0.7",
37
+ "cheminfo-tools": "^1.23.3",
38
+ "codecov": "^3.6.5",
39
+ "eslint": "^6.8.0",
40
+ "eslint-config-cheminfo": "^2.0.4",
41
+ "eslint-plugin-import": "^2.20.1",
42
+ "eslint-plugin-jest": "^23.8.0",
43
+ "eslint-plugin-prettier": "^3.1.2",
44
+ "jest": "^25.1.0",
45
+ "npm-run-all": "^4.1.5",
46
+ "prettier": "^1.19.1"
47
+ },
48
+ "dependencies": {
49
+ "rollup": "^1.31.1"
40
50
  }
41
51
  }
@@ -1,6 +1,4 @@
1
- 'use strict';
2
-
3
- const isAnyArray = require('..');
1
+ import isAnyArray from '..';
4
2
 
5
3
  test('isArray', () => {
6
4
  expect(isAnyArray(1)).toBe(false);
package/src/index.js CHANGED
@@ -1,9 +1,5 @@
1
- 'use strict';
2
-
3
1
  const toString = Object.prototype.toString;
4
2
 
5
- function isAnyArray(object) {
3
+ export default function isAnyArray(object) {
6
4
  return toString.call(object).endsWith('Array]');
7
5
  }
8
-
9
- module.exports = isAnyArray;