Skip to content

Commit

Permalink
export as default; add more sort keys
Browse files Browse the repository at this point in the history
  • Loading branch information
chernjie committed Aug 14, 2022
1 parent 9b762c0 commit b1f39d5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bin/hashable
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
7 changes: 5 additions & 2 deletions config/priority.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"category",
"value",
"label",
"page"
]
"page",
"language",
"store_id",
"category_id"
]
2 changes: 1 addition & 1 deletion docs/hashable.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ function _isObject(obj) {
return type === 'function' || (type === 'object' && !!obj)
}

if (module) module.exports = { hashable }
if (module) module.exports = hashable
7 changes: 5 additions & 2 deletions docs/priority.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"category",
"value",
"label",
"page"
]
"page",
"language",
"store_id",
"category_id"
]
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__test__/hashable.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { hashable } = require('../hashable')
const hashable = require('../hashable')

const sample1 = {
"id": "0002",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/hashable.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ function _isObject(obj) {
return type === 'function' || (type === 'object' && !!obj)
}

if (module) module.exports = { hashable }
if (module) module.exports = hashable

0 comments on commit b1f39d5

Please sign in to comment.