mmenu-js
Version:
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.
33 lines (28 loc) • 560 B
text/typescript
const opts : mmOptionsAutoheight = {
height: 'default'
};
export default opts;
/**
* Extend shorthand options.
*
* @param {object} options The options to extend.
* @return {object} The extended options.
*/
export function extendShorthandOptions(
options : mmOptionsAutoheight
) : mmOptionsAutoheight {
if ( typeof options == 'boolean' && options ) {
options = {
height: 'auto'
};
}
if ( typeof options == 'string' ) {
options = {
height: options
};
}
if ( typeof options != 'object' ) {
options = {};
}
return options;
};