Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1009163 // jsJoinHack - enable object.join()

JavaX fragment (include)

static S jsJoinHack() {
  ret hjavascript([=[
Object.prototype.join = function(glue, separator) { 
  var object = this;

  if (glue == undefined)
    glue = '=';

  if (separator == undefined)
    separator = ',';    

  return $.map(Object.getOwnPropertyNames(object), function(k) { return [k, object[k]].join(glue) }).join(separator);
}
]=]);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1009163
Snippet name: jsJoinHack - enable object.join()
Eternal ID of this version: #1009163/4
Text MD5: 6f68d6585ca418b913c5938395d14631
Author: stefan
Category: javax / internet
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-10 19:55:18
Source code size: 360 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 438 / 463
Version history: 3 change(s)
Referenced in: [show references]