nl_tokens: Get the max sizes in a rectangle under the given aspect ratio .
pl_tokens: function getAdjustedSizes ( _ref4 ) // or 'cover' { var aspectRatio = _ref4 . aspectRatio , height = _ref4 . height , width = _ref4 . width ; var type = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : 'contain' ; var isValidWidth = isPositiveNumber ( width ) ; var isValidHeight = isPositiveNumber ( height ) ; if ( isValidWidth && isValidHeight ) { var adjustedWidth = height * aspectRatio ; if ( type === 'contain' && adjustedWidth > width || type === 'cover' && adjustedWidth < width ) { height = width / aspectRatio ; } else { width = height * aspectRatio ; } } else if ( isValidWidth ) { height = width / aspectRatio ; } else if ( isValidHeight ) { width = height * aspectRatio ; } return { width : <mask> , height : height } ; }