Skip to content

Commit

Permalink
fix inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
fcurella committed Nov 23, 2022
1 parent a105d90 commit 69cc3bb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 347 deletions.
5 changes: 3 additions & 2 deletions source/combineReducers.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "CoreLibs/object"

local Logger = import('utils/logger')
local Env = import('env')
local inspect = import('utils/inspect')
local ActionTypes = import('utils/actionTypes')
local isPlainObject = import('utils/isPlainObject')
local Null = import('null')
Expand Down Expand Up @@ -53,7 +54,7 @@ local function getUnexpectedStateShapeWarningMessage(
[[Expected argument to be an object with the following keys: "%s".]]
},
argumentName,
inspect(inputState, {depth = 1}),
printTable(inputState),
table.concat(reducerKeys, '", "')
)
end
Expand Down
6 changes: 2 additions & 4 deletions source/helpers/main.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
local array = import("helpers/array")
local assign = import("helpers/assign")
local inspect = import("utils/inspect")
local array = import("array")
local assign = import("assign")

return {
Array = array,
assign = assign,
inspect = inspect,
}
333 changes: 0 additions & 333 deletions source/utils/inspect.lua

This file was deleted.

7 changes: 4 additions & 3 deletions source/utils/logger.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local inspect = import('utils/inspect')
import "CoreLibs/object"

local Logger = {}

local unpack = unpack or table.unpack
Expand All @@ -9,7 +10,7 @@ local function prettyPrint(tag, ...)
local msgs = {...}
for i=1, #msgs do
if type(msgs[i]) ~= 'string' then
msgs[i] = inspect(msgs[i])
msgs[i] = printTable(msgs[i])
end
end
print(tag, unpack(msgs))
Expand All @@ -20,7 +21,7 @@ local function prettyPrintTrace(tag, ...)
local msgs = {...}
for i=1, #msgs do
if type(msgs[i]) ~= 'string' then
msgs[i] = inspect(msgs[i])
msgs[i] = printTable(msgs[i])
end
end
print(tag, unpack(msgs))
Expand Down
Loading

0 comments on commit 69cc3bb

Please sign in to comment.