Commons functions

Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
Fabio José 2019-06-16 18:44:38 -03:00
parent d1fc0b39f0
commit c37b31fc3b
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
function sanity_and_clone(headers) {
var sanity_headers = JSON.parse(JSON.stringify(headers));
for(header in sanity_headers){
sanity_headers[header.toLowerCase()] = sanity_headers[header];
}
return sanity_headers;
}
module.exports = {
sanity_and_clone : sanity_and_clone
};