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
// Element in to expand/collapse needs to have `overflow: hidden` applied to it | |
/** | |
* Collapse element height | |
* @param {HTMLElement} element - Element to collapse | |
* @param {Number} [height=0] - Size of element height in pixels | |
*/ | |
function collapseSection(element, height = 0) { | |
const sectionHeight = element.scrollHeight; | |
const elementTransition = element.style.transition; |
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
/** | |
* Convert string to camelCase. | |
* Function will remove `,`, `_`, `-`, and `' '` from string. | |
* | |
* Note: Function does not strip numeric characters. | |
* A string like `hello 1world` would return `hello1world` | |
* | |
* @example | |
* camelCase('hello world') // returns 'helloWorld' | |
* |
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
/** | |
* Convert string to pascalCase. | |
* Function will remove `,`, `_`, `-`, and `' '` from string. | |
* | |
* Note: Function does not strip numeric characters. | |
* A string like `hello 1world` would return `Hello1world` | |
* | |
* @example | |
* pascalCase('hello world') // returns 'HelloWorld' | |
* |
OlderNewer