@@ -68,7 +68,7 @@ return /******/ (function(modules) { // webpackBootstrap
68
68
* FE Development Lab <[email protected] >
69
69
* @namespace tui.util
70
70
*/
71
- var util ;
71
+ var util = { } ;
72
72
var object = __webpack_require__ ( 1 ) ;
73
73
var extend = object . extend ;
74
74
@@ -93,7 +93,7 @@ return /******/ (function(modules) { // webpackBootstrap
93
93
util . HashMap = __webpack_require__ ( 19 ) ;
94
94
util . Map = __webpack_require__ ( 18 ) ;
95
95
96
- module . exports = tui ;
96
+ module . exports = util ;
97
97
98
98
99
99
/***/ } ) ,
@@ -627,48 +627,48 @@ return /******/ (function(modules) { // webpackBootstrap
627
627
* @memberof tui.util
628
628
*/
629
629
function isEmpty ( obj ) {
630
- return ( ! isExisty ( obj ) ||
631
- ( isString ( obj ) && _isEmptyString ( obj ) ) ||
632
- ( isArray ( obj ) && _isEmptyArray ( obj ) ) ||
633
- ( isObject ( obj ) && ( isFunction ( obj ) || _isEmptyObject ( obj ) ) )
634
- ) ;
635
- }
630
+ if ( ! isExisty ( obj ) || _isEmptyString ( obj ) ) {
631
+ return true ;
632
+ }
636
633
637
- /**
638
- * Check string is empty
639
- * @private
640
- * @param {string } str - string
641
- * @returns {boolean } Is empty?
642
- */
643
- function _isEmptyString ( str ) {
644
- return str === '' ;
634
+ if ( isArray ( obj ) || isArguments ( obj ) ) {
635
+ return obj . length === 0 ;
636
+ }
637
+
638
+ if ( isObject ( obj ) && ! isFunction ( obj ) ) {
639
+ return ! _hasOwnProperty ( obj ) ;
640
+ }
641
+
642
+ return true ;
645
643
}
646
644
647
645
/**
648
- * Check array or array like object is empty
646
+ * Check whether given argument is empty string
647
+ * @param {* } obj - Target for checking
648
+ * @returns {boolean } whether given argument is empty string
649
+ * @memberof tui.util
649
650
* @private
650
- * @param {...Array } arr - array
651
- * @returns {boolean } Is empty?
652
651
*/
653
- function _isEmptyArray ( arr ) {
654
- return arr . length === 0 ;
652
+ function _isEmptyString ( obj ) {
653
+ return isString ( obj ) && obj === '' ;
655
654
}
656
655
657
656
/**
658
- * Check object is empty
657
+ * Check whether given argument has own property
658
+ * @param {Object } obj - Target for checking
659
+ * @returns {boolean } - whether given argument has own property
660
+ * @memberof tui.util
659
661
* @private
660
- * @param {Object } obj - object
661
- * @returns {boolean } Is empty?
662
662
*/
663
- function _isEmptyObject ( obj ) {
663
+ function _hasOwnProperty ( obj ) {
664
664
var key ;
665
665
for ( key in obj ) {
666
666
if ( obj . hasOwnProperty ( key ) ) {
667
- return false ;
667
+ return true ;
668
668
}
669
669
}
670
670
671
- return true ;
671
+ return false ;
672
672
}
673
673
674
674
/**
@@ -825,7 +825,7 @@ return /******/ (function(modules) { // webpackBootstrap
825
825
826
826
/**
827
827
* Returns the first index at which a given element can be found in the array
828
- * from start index(default 0), or -1 if it is not present.
828
+ * from start index(default 0), or -1 if it is not present.<br>
829
829
* It compares searchElement to elements of the Array using strict equality
830
830
* (the same method used by the ===, or triple-equals, operator).
831
831
* @param {* } searchElement Element to locate in the array
@@ -895,8 +895,8 @@ return /******/ (function(modules) { // webpackBootstrap
895
895
896
896
/**
897
897
* Execute the provided callback once for each element present
898
- * in the array(or Array-like object) in ascending order.
899
- * If the callback function returns false, the loop will be stopped.
898
+ * in the array(or Array-like object) in ascending order.<br>
899
+ * If the callback function returns false, the loop will be stopped.<br>
900
900
* Callback function(iteratee) is invoked with three arguments:
901
901
* - The value of the element
902
902
* - The index of the element
@@ -999,9 +999,9 @@ return /******/ (function(modules) { // webpackBootstrap
999
999
1000
1000
/**
1001
1001
* Execute the provided callback function once for each element in an array, in order,
1002
- * and constructs a new array from the results.
1002
+ * and constructs a new array from the results.<br>
1003
1003
* If the object is Array-like object(ex-arguments object),
1004
- * It needs to transform to Array.(see 'ex2' of forEach example)
1004
+ * It needs to transform to Array.(see 'ex2' of forEach example)<br>
1005
1005
* Callback function(iteratee) is invoked with three arguments:
1006
1006
* - The value of the property(or The value of the element)
1007
1007
* - The name of the property(or The index of the element)
@@ -1031,9 +1031,9 @@ return /******/ (function(modules) { // webpackBootstrap
1031
1031
}
1032
1032
1033
1033
/**
1034
- * Execute the callback function once for each element present in the array(or Array-like object or plain object).
1034
+ * Execute the callback function once for each element present in the array(or Array-like object or plain object).<br>
1035
1035
* If the object is Array-like object(ex-arguments object),
1036
- * It needs to transform to Array.(see 'ex2' of forEach example)
1036
+ * It needs to transform to Array.(see 'ex2' of forEach example)<br>
1037
1037
* Callback function(iteratee) is invoked with four arguments:
1038
1038
* - The previousValue
1039
1039
* - The currentValue
@@ -1075,7 +1075,7 @@ return /******/ (function(modules) { // webpackBootstrap
1075
1075
}
1076
1076
1077
1077
/**
1078
- * Transform the Array-like object to Array.
1078
+ * Transform the Array-like object to Array.<br>
1079
1079
* In low IE (below 8), Array.prototype.slice.call is not perfect. So, try-catch statement is used.
1080
1080
* @param {* } arrayLike Array-like object
1081
1081
* @returns {Array } Array
@@ -1272,7 +1272,7 @@ return /******/ (function(modules) { // webpackBootstrap
1272
1272
}
1273
1273
1274
1274
/**
1275
- * Provide a simple inheritance in prototype-oriented.
1275
+ * Provide a simple inheritance in prototype-oriented.<br>
1276
1276
* Caution :
1277
1277
* Don't overwrite the prototype of child constructor.
1278
1278
*
@@ -1767,16 +1767,16 @@ return /******/ (function(modules) { // webpackBootstrap
1767
1767
* When transmit the POST-data, some browsers alert a message for confirming whether retransmit or not.
1768
1768
*
1769
1769
* @param {string } [options.postBridgeUrl='']
1770
- * - Use this url to avoid a certain bug occuring when transmitting POST data to the popup in IE11.<br>
1771
- * This specific buggy situation is known to happen because IE11 tries to open the requested url
1772
- * not in a new popup window as intended, but in a new tab.<br>
1773
- * See {@link http://wiki.nhnent.com/pages/viewpage.action?pageId=240562844}
1770
+ * Use this url to avoid a certain bug occuring when transmitting POST data to the popup in IE11.<br>
1771
+ * This specific buggy situation is known to happen because IE11 tries to open the requested url<br>
1772
+ * not in a new popup window as intended, but in a new tab.<br>
1773
+ * See {@link http://wiki.nhnent.com/pages/viewpage.action?pageId=240562844}
1774
1774
*
1775
1775
* @param {string } [options.method=get]
1776
- * - The method of transmission when the form-data is transmitted to popup-window.
1776
+ * The method of transmission when the form-data is transmitted to popup-window.
1777
1777
*
1778
1778
* @param {Object } [options.param=null]
1779
- * - Using as parameters for transmission when the form-data is transmitted to popup-window.
1779
+ * Using as parameters for transmission when the form-data is transmitted to popup-window.
1780
1780
*/
1781
1781
Popup . prototype . openPopup = function ( url , options ) { // eslint-disable-line complexity
1782
1782
var popup , formElement , useIEPostBridge ;
@@ -3042,7 +3042,7 @@ return /******/ (function(modules) { // webpackBootstrap
3042
3042
* MYENUM.set('TYPE3', 'TYPE4');
3043
3043
*
3044
3044
* //get name of a constant by a value
3045
- * MYENUM.getName(MYENUM.TYPE1); // 'TYPE1'이 리턴된다.
3045
+ * MYENUM.getName(MYENUM.TYPE1); // 'TYPE1'
3046
3046
*
3047
3047
* // In modern browsers (except IE8 and lower), a value can not be changed in constants.
3048
3048
* var originalValue = MYENUM.TYPE1;
0 commit comments