Transaction

037fe31b7536913bc7542508097389d6c2d4bb1011fdac3039e3287aef1b2cbe
( - )
247,944
2019-08-21 22:53:18
1
1,189 B

2 Outputs

Total Output:
  • j"1PcsNYNzonE39gdZkvXEdt7TKBT5bXQoz4M©--[[ Implements the B:// protocal and creates a file object using the given parameters. This function always creates a new context. ## Examples TODO @version 0.0.1 @author Libs ]]-- function main(_ctx, data, mediatype, encoding, name) -- Local helper method to determine if a string is blank local function isblank(str) return str == nil or str == '' end assert( not isblank(data), 'Invalid file parameters.') -- Build the file object file = { data = data, type = mediatype, encoding = encoding, name = name } -- Nullify blank attributes if isblank(file.type) then file.type = nil end if isblank(file.name) then file.name = nil end if isblank(file.encoding) then -- Default text files to utf8 encoding if not isblank(file.type) and string.match(file.type, '^text%/') then file.encoding = 'utf8' else file.encoding = nil end end return file endbitcom/b
    https://whatsonchain.com/tx/037fe31b7536913bc7542508097389d6c2d4bb1011fdac3039e3287aef1b2cbe