Skip to content

Commit 695d5cb

Browse files
author
youjung-hong
committed
Merge branch 'develop'
2 parents 4e6be02 + 6731873 commit 695d5cb

24 files changed

+6466
-399
lines changed

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2016 NHN Entertainment Corp.
3+
Copyright (c) 2017 NHN Entertainment Corp.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
22-

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ It includes several features like `class simulation`, `browser detecting`, `type
6969
* Firefox
7070

7171
## Download/Install
72-
* Bower:
72+
* bower:
7373
* Latest: `bower install tui-code-snippet`
7474
* Each Version: `bower install tui-code-snippet[#tag]`
75+
* npm:
76+
* Latest: `npm install tui-code-snippet`
77+
* Each Version: `npm install tui-code-snippet[@tag]`
7578
* Download: https://github.com/nhnent/tui.code-snippet

bower.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
{
22
"name": "tui-code-snippet",
33
"authors": [
4-
"NHN Ent. FE dev team([email protected])"
4+
"NHN Ent. FE dev Lab([email protected])"
55
],
66
"license": "MIT",
77
"main": "dist/tui-code-snippet.js",
88
"ignore": [
99
"**/.*",
1010
".*",
1111
"src",
12-
"bin",
1312
"node_modules",
1413
"bower_components",
1514
"test",
1615
"bower.json",
17-
"conf.json",
18-
"karma.conf.js",
19-
"package.json",
20-
"karma.local.conf.js",
21-
"tutorial"
16+
"webpack.config.js",
17+
"jsdoc.conf.json"
2218
],
2319
"devDependencies": {
2420
"jquery": "~1.8.3"

dist/tui-code-snippet.js

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ return /******/ (function(modules) { // webpackBootstrap
6868
* FE Development Lab <[email protected]>
6969
* @namespace tui.util
7070
*/
71-
var util;
71+
var util = {};
7272
var object = __webpack_require__(1);
7373
var extend = object.extend;
7474

@@ -93,7 +93,7 @@ return /******/ (function(modules) { // webpackBootstrap
9393
util.HashMap = __webpack_require__(19);
9494
util.Map = __webpack_require__(18);
9595

96-
module.exports = tui;
96+
module.exports = util;
9797

9898

9999
/***/ }),
@@ -627,48 +627,48 @@ return /******/ (function(modules) { // webpackBootstrap
627627
* @memberof tui.util
628628
*/
629629
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+
}
636633

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;
645643
}
646644

647645
/**
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
649650
* @private
650-
* @param {...Array} arr - array
651-
* @returns {boolean} Is empty?
652651
*/
653-
function _isEmptyArray(arr) {
654-
return arr.length === 0;
652+
function _isEmptyString(obj) {
653+
return isString(obj) && obj === '';
655654
}
656655

657656
/**
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
659661
* @private
660-
* @param {Object} obj - object
661-
* @returns {boolean} Is empty?
662662
*/
663-
function _isEmptyObject(obj) {
663+
function _hasOwnProperty(obj) {
664664
var key;
665665
for (key in obj) {
666666
if (obj.hasOwnProperty(key)) {
667-
return false;
667+
return true;
668668
}
669669
}
670670

671-
return true;
671+
return false;
672672
}
673673

674674
/**
@@ -825,7 +825,7 @@ return /******/ (function(modules) { // webpackBootstrap
825825

826826
/**
827827
* 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>
829829
* It compares searchElement to elements of the Array using strict equality
830830
* (the same method used by the ===, or triple-equals, operator).
831831
* @param {*} searchElement Element to locate in the array
@@ -895,8 +895,8 @@ return /******/ (function(modules) { // webpackBootstrap
895895

896896
/**
897897
* 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>
900900
* Callback function(iteratee) is invoked with three arguments:
901901
* - The value of the element
902902
* - The index of the element
@@ -999,9 +999,9 @@ return /******/ (function(modules) { // webpackBootstrap
999999

10001000
/**
10011001
* 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>
10031003
* 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>
10051005
* Callback function(iteratee) is invoked with three arguments:
10061006
* - The value of the property(or The value of the element)
10071007
* - The name of the property(or The index of the element)
@@ -1031,9 +1031,9 @@ return /******/ (function(modules) { // webpackBootstrap
10311031
}
10321032

10331033
/**
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>
10351035
* 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>
10371037
* Callback function(iteratee) is invoked with four arguments:
10381038
* - The previousValue
10391039
* - The currentValue
@@ -1075,7 +1075,7 @@ return /******/ (function(modules) { // webpackBootstrap
10751075
}
10761076

10771077
/**
1078-
* Transform the Array-like object to Array.
1078+
* Transform the Array-like object to Array.<br>
10791079
* In low IE (below 8), Array.prototype.slice.call is not perfect. So, try-catch statement is used.
10801080
* @param {*} arrayLike Array-like object
10811081
* @returns {Array} Array
@@ -1272,7 +1272,7 @@ return /******/ (function(modules) { // webpackBootstrap
12721272
}
12731273

12741274
/**
1275-
* Provide a simple inheritance in prototype-oriented.
1275+
* Provide a simple inheritance in prototype-oriented.<br>
12761276
* Caution :
12771277
* Don't overwrite the prototype of child constructor.
12781278
*
@@ -1767,16 +1767,16 @@ return /******/ (function(modules) { // webpackBootstrap
17671767
* When transmit the POST-data, some browsers alert a message for confirming whether retransmit or not.
17681768
*
17691769
* @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}
17741774
*
17751775
* @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.
17771777
*
17781778
* @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.
17801780
*/
17811781
Popup.prototype.openPopup = function(url, options) { // eslint-disable-line complexity
17821782
var popup, formElement, useIEPostBridge;
@@ -3042,7 +3042,7 @@ return /******/ (function(modules) { // webpackBootstrap
30423042
* MYENUM.set('TYPE3', 'TYPE4');
30433043
*
30443044
* //get name of a constant by a value
3045-
* MYENUM.getName(MYENUM.TYPE1); // 'TYPE1'이 리턴된다.
3045+
* MYENUM.getName(MYENUM.TYPE1); // 'TYPE1'
30463046
*
30473047
* // In modern browsers (except IE8 and lower), a value can not be changed in constants.
30483048
* var originalValue = MYENUM.TYPE1;

dist/tui-code-snippet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

0 commit comments

Comments
 (0)