diff --git a/lib/utils/json-utils.js b/lib/utils/json-utils.js deleted file mode 100644 index 3002bf3f7..000000000 --- a/lib/utils/json-utils.js +++ /dev/null @@ -1,10 +0,0 @@ - -const { stringify } = require('flatted/cjs') - -const JsonUtils = { - stringify (obj) { - return stringify(obj) - } -} - -module.exports = JsonUtils diff --git a/package-lock.json b/package-lock.json index 75b5f56a5..df060cd41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6217,12 +6217,6 @@ } } }, - "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", - "dev": true - }, "follow-redirects": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", diff --git a/package.json b/package.json index 3ba73d283..487e40f48 100644 --- a/package.json +++ b/package.json @@ -431,7 +431,6 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", - "flatted": "^2.0.2", "grunt": "^1.2.1", "grunt-auto-release": "^0.0.7", "grunt-browserify": "^5.0.0", diff --git a/test/unit/utils/json-utils.spec.js b/test/unit/utils/json-utils.spec.js deleted file mode 100644 index 92b69762a..000000000 --- a/test/unit/utils/json-utils.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -const JsonUtils = require('../../../lib/utils/json-utils') - -describe('json-utils', () => { - it('stringify-s', () => { - const obj = { a: 'a', i: 1 } - const json = JsonUtils.stringify(obj) - expect(json).to.be.equal('[{"a":"1","i":1},"a"]') - }) - it('stringify-s circular data', () => { - const a = [{}] - a[0].a = a - a.push(a) - - expect(JsonUtils.stringify(a)).to.be.equal('[["1","0"],{"a":"0"}]') - }) -})