Skip to content

Commit 945c232

Browse files
author
Ben Baumgold
committed
#70 shorter
1 parent 479d25d commit 945c232

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/TableView.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,8 @@ function _showtable_async!(w, schema, names, types, rows, coldefs, tablelength,
258258
onimport(w, handler)
259259
end
260260

261-
function _is_javascript_safe(x::Integer)
262-
-(Int64(2)^53-1) < x < Int64(2)^53-1
263-
end
264-
265-
function _is_javascript_safe(x::AbstractFloat)
266-
-(Float64(2)^53-1) < x < Float64(2)^53-1
267-
end
261+
_is_javascript_safe(x::Integer) = -(Int64(2)^53-1) < x < Int64(2)^53-1
262+
_is_javascript_safe(x::AbstractFloat) = -(Float64(2)^53-1) < x < Float64(2)^53-1
268263

269264
# directly write JSON instead of allocating temporary dicts etc
270265
function table2json(schema, rows, types; requested = nothing)

0 commit comments

Comments
 (0)