refactor(utils): put in folder

This commit is contained in:
moklick
2019-10-06 19:05:14 +02:00
parent cc2775dd78
commit 3bb6e892aa
11 changed files with 10 additions and 10 deletions
+8
View File
@@ -0,0 +1,8 @@
export const isFunction = obj => !!(obj && obj.constructor && obj.call && obj.apply);
export const isInputNode = e => e && e.target && ['INPUT', 'SELECT', 'TEXTAREA'].includes(e.target.nodeName);
export const getDimensions = (node = {}) => ({
width: node.offsetWidth,
height: node.offsetHeight
});