parent
ae4085f7c0
commit
7657157586
@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Safe chained function
|
||||
*
|
||||
* Will only create a new function if needed,
|
||||
* otherwise will pass back existing functions or null.
|
||||
*
|
||||
* @returns {function|null}
|
||||
*/
|
||||
export default function createChainedFunction() {
|
||||
const args = [].slice.call(arguments, 0);
|
||||
if (args.length === 1) {
|
||||
return args[0];
|
||||
}
|
||||
|
||||
return function chainedFunction() {
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
if (args[i] && args[i].apply) {
|
||||
args[i].apply(this, arguments);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
export default function isFlexSupported() {
|
||||
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
|
||||
const { documentElement } = window.document;
|
||||
return (
|
||||
'flex' in documentElement.style ||
|
||||
'webkitFlex' in documentElement.style ||
|
||||
'Flex' in documentElement.style ||
|
||||
'msFlex' in documentElement.style
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
Loading…
Reference in new issue