Skip to content

Commit

Permalink
#70 shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Baumgold committed Mar 28, 2021
1 parent 479d25d commit 945c232
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/TableView.jl
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,8 @@ function _showtable_async!(w, schema, names, types, rows, coldefs, tablelength,
onimport(w, handler)
end

function _is_javascript_safe(x::Integer)
-(Int64(2)^53-1) < x < Int64(2)^53-1
end

function _is_javascript_safe(x::AbstractFloat)
-(Float64(2)^53-1) < x < Float64(2)^53-1
end
_is_javascript_safe(x::Integer) = -(Int64(2)^53-1) < x < Int64(2)^53-1
_is_javascript_safe(x::AbstractFloat) = -(Float64(2)^53-1) < x < Float64(2)^53-1

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

0 comments on commit 945c232

Please sign in to comment.