Comparison

util/jsonpointer.lua @ 12802:4a8740e01813

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 12 Dec 2022 07:10:54 +0100
parent 12781:22066b02887f
comparison
equal deleted inserted replaced
12801:ebd6b4d8bf04 12802:4a8740e01813
1 local m_type = math.type or function (n) 1 local m_type = math.type;
2 return n % 1 == 0 and n <= 9007199254740992 and n >= -9007199254740992 and "integer" or "float";
3 end;
4 2
5 local function unescape_token(escaped_token) 3 local function unescape_token(escaped_token)
6 local unescaped = escaped_token:gsub("~1", "/"):gsub("~0", "~") 4 local unescaped = escaped_token:gsub("~1", "/"):gsub("~0", "~")
7 return unescaped 5 return unescaped
8 end 6 end