This file contains 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
//From Pragmatic Guide to Javascript | |
function repeat(options) { | |
options = options || {}; | |
for (var opt in (repeat.defaultOptions || {})) { | |
if (!(opt in options)) { | |
options[opt] = repeat.defaultOptions[opt]; | |
} | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
// Taken from: https://aws.amazon.com/blogs/networking-and-content-delivery/resizing-images-with-amazon-cloudfront-lambdaedge-aws-cdn-blog/ | |
'use strict'; | |
const querystring = require('querystring'); | |
// defines the allowed dimensions, default dimensions and how much variance from allowed | |
// dimension is allowed. | |
const variables = { |