diff --git a/.travis.yml b/.travis.yml index d99a0ba..4796715 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ language: node_js node_js: - - "8" - "node" \ No newline at end of file diff --git a/README.md b/README.md index 03a98f6..6ab1891 100644 --- a/README.md +++ b/README.md @@ -155,4 +155,7 @@ $ npm install && npm test ### License Copyright © 2018, [kmdrGroch](https://github.com/kmdrgroch). -Released under the [MIT License](LICENSE). \ No newline at end of file +Released under the [MIT License](LICENSE). + +### Note +The code will work for node >= 8, although there is a possibility that development tools won't work for some versions. \ No newline at end of file diff --git a/package.json b/package.json index 4b88b10..532545f 100644 --- a/package.json +++ b/package.json @@ -11,20 +11,20 @@ "test": "npm run build && nyc --include src/**/*.js --reporter=html --report-dir=coverage --check-coverage mocha \" src/**/*.spec.js\"" }, "devDependencies": { - "@types/benchmark": "^1.0.31", - "@types/chai": "^4.1.7", - "@types/mocha": "^5.2.6", - "@types/node": "^11.9.3", - "benchmark": "^2.1.4", - "chai": "^4.2.0", - "mocha": "^6.0.0", - "nyc": "^14.0.0", - "rimraf": "^2.6.3", - "tslint": "^5.12.1", - "typescript": "^3.3.3" + "@types/benchmark": "1.0.33", + "@types/chai": "4.2.12", + "@types/mocha": "8.0.1", + "@types/node": "14.0.27", + "benchmark": "2.1.4", + "chai": "4.2.0", + "mocha": "8.1.1", + "nyc": "15.1.0", + "rimraf": "3.0.2", + "tslint": "6.1.3", + "typescript": "3.9.7" }, "dependencies": { - "param-type": "^1.1.0" + "param-type": "^1.1.1" }, "author": "kmdrGroch", "license": "MIT" diff --git a/src/paramsEqual.js b/src/paramsEqual.js index 6993636..3164605 100644 --- a/src/paramsEqual.js +++ b/src/paramsEqual.js @@ -29,7 +29,7 @@ const paramsEqual = (a, b) => { if (a.length !== b.length) { return false; } - for (const k in a) { + for (const k of Object.keys(a)) { const propsA = Object.getOwnPropertyDescriptor(a, k) || {}; const propsB = Object.getOwnPropertyDescriptor(b, k) || {}; if (a[k] === a) { diff --git a/src/paramsEqual.js.map b/src/paramsEqual.js.map index 03ed395..d6c52ab 100644 --- a/src/paramsEqual.js.map +++ b/src/paramsEqual.js.map @@ -1 +1 @@ -{"version":3,"file":"paramsEqual.js","sourceRoot":"","sources":["paramsEqual.ts"],"names":[],"mappings":";;AAAA,2CAAmC;AAEnC,MAAM,QAAQ,GAAiB,MAAM,CAAC,QAAQ,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,GAAG,CAAC,CAAM,EAAE,CAAM,EAAW,EAAE;IAC9C,0BAA0B;IAC1B,IAAI,oBAAS,CAAC,CAAC,CAAC,KAAK,oBAAS,CAAC,CAAC,CAAC,EAAE;QACjC,OAAO,KAAK,CAAC;KACd;IACD,4CAA4C;IAC5C,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;QACzB,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KACxB;IACD,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,oBAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;QAChF,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC;KAChC;IACD,qBAAqB;IACrB,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE;QAC3B,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KAC9C;IACD,mBAAmB;IACnB,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IACD,KAAK,MAAM,CAAC,IAAI,CAAC,EAAE;QACjB,MAAM,MAAM,GAAG,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAA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AAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACpD,OAAO,KAAK,CAAC;SACd;QACD,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACZ,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;KACb;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"} \ No newline at end of file diff --git a/src/paramsEqual.ts b/src/paramsEqual.ts index 3aad586..4438fa2 100644 --- a/src/paramsEqual.ts +++ b/src/paramsEqual.ts @@ -29,7 +29,7 @@ const paramsEqual = (a: any, b: any): boolean => { if (a.length !== b.length) { return false; } - for (const k in a) { + for (const k of Object.keys(a)) { const propsA = Object.getOwnPropertyDescriptor(a, k) || {}; const propsB = Object.getOwnPropertyDescriptor(b, k) || {};