@icgio/icg-utils 1.9.45 → 1.9.47

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.
Files changed (2) hide show
  1. package/lib/utils.js +4 -2
  2. package/package.json +1 -1
package/lib/utils.js CHANGED
@@ -260,7 +260,7 @@ function cut_orderbook(input_array, level_target) {
260
260
  }
261
261
 
262
262
  function level_position(input_array, level_target) {
263
- if (input_array.length <= level_target) {
263
+ if (input_array.length < level_target) {
264
264
  level_target--
265
265
  return level_position(input_array, level_target)
266
266
  }
@@ -837,7 +837,9 @@ function number_with_commas(x) {
837
837
  const EXCHANGE_ACCOUNT_KEY_RE = /^([a-z0-9]+)_(\d+)$/
838
838
 
839
839
  function normalize_exchange_key(exchange) {
840
- return String(exchange || '').trim().toLowerCase()
840
+ return String(exchange || '')
841
+ .trim()
842
+ .toLowerCase()
841
843
  }
842
844
 
843
845
  function is_exchange_account_key(exchange) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-utils",
3
- "version": "1.9.45",
3
+ "version": "1.9.47",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {