Created
October 21, 2018 11:58
-
-
Save ufocoder/7df39101a36b1784b853513e15d134c6 to your computer and use it in GitHub Desktop.
Revisions
-
ufocoder created this gist
Oct 21, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ function type(value) { var regex = /^\[object (\S+?)\]$/; var matches = Object.prototype.toString.call(value).match(regex) || []; return (matches[1] || 'undefined').toLowerCase(); }