From b1f39d57ee62f2886addaf5ee13f05109bb8d7f9 Mon Sep 17 00:00:00 2001 From: CJ Date: Sun, 14 Aug 2022 10:13:00 -0700 Subject: [PATCH] export as default; add more sort keys --- bin/hashable | 2 +- config/priority.json | 7 +++++-- docs/hashable.js | 2 +- docs/priority.json | 7 +++++-- package-lock.json | 2 +- package.json | 2 +- src/utils/__test__/hashable.test.js | 2 +- src/utils/hashable.js | 2 +- 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/bin/hashable b/bin/hashable index 9149497..416c597 100755 --- a/bin/hashable +++ b/bin/hashable @@ -20,7 +20,7 @@ const fs = require('fs') const path = require('path') -const { hashable } = require('../src/utils/hashable') +const hashable = require('../src/utils/hashable') const { readInput, parseArgs } = require('../src/utils/readInput') const defaultSort = require('../config/priority') diff --git a/config/priority.json b/config/priority.json index 2837413..85bdbe0 100644 --- a/config/priority.json +++ b/config/priority.json @@ -6,5 +6,8 @@ "category", "value", "label", - "page" -] \ No newline at end of file + "page", + "language", + "store_id", + "category_id" +] diff --git a/docs/hashable.js b/docs/hashable.js index 4b1d08a..45871dd 100644 --- a/docs/hashable.js +++ b/docs/hashable.js @@ -74,4 +74,4 @@ function _isObject(obj) { return type === 'function' || (type === 'object' && !!obj) } -if (module) module.exports = { hashable } +if (module) module.exports = hashable diff --git a/docs/priority.json b/docs/priority.json index 2837413..85bdbe0 100644 --- a/docs/priority.json +++ b/docs/priority.json @@ -6,5 +6,8 @@ "category", "value", "label", - "page" -] \ No newline at end of file + "page", + "language", + "store_id", + "category_id" +] diff --git a/package-lock.json b/package-lock.json index aa169b8..505d0b9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hashable-json", - "version": "1.1.1", + "version": "1.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f0811c9..0f84dd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hashable-json", - "version": "1.1.1", + "version": "1.1.2", "description": "Generate consistent hashable JSON payload, great for piping through hash functions. Works in CLI and is importable", "repository": { "type": "git", diff --git a/src/utils/__test__/hashable.test.js b/src/utils/__test__/hashable.test.js index 18abcf5..49d45fa 100644 --- a/src/utils/__test__/hashable.test.js +++ b/src/utils/__test__/hashable.test.js @@ -1,4 +1,4 @@ -const { hashable } = require('../hashable') +const hashable = require('../hashable') const sample1 = { "id": "0002", diff --git a/src/utils/hashable.js b/src/utils/hashable.js index 4b1d08a..45871dd 100644 --- a/src/utils/hashable.js +++ b/src/utils/hashable.js @@ -74,4 +74,4 @@ function _isObject(obj) { return type === 'function' || (type === 'object' && !!obj) } -if (module) module.exports = { hashable } +if (module) module.exports = hashable