This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let data = process.argv[2] | |
let unmarshalled = JSON.parse(data) | |
function toCamelCase(key) { | |
return key.split('_')(key).map(convertCase).join('') | |
} | |
function convertCase(key) { | |
if(key.toLowerCase() == "id") return key.toUpperCase() | |
return key[0].toUpperCase() + key.slice(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% vim: ts=2:sw=2:noet:tw=80 | |
% dnspkt.erl: Parse a dns query packet. | |
% Copyright 2013, Olof Johansson <[email protected]> | |
% | |
% Copying and distribution of this file, with or without | |
% modification, are permitted in any medium without royalty | |
% provided the copyright notice are preserved. This file is | |
% offered as-is, without any warranty. |