Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
youjung-hong committed Jul 13, 2017
2 parents 4e6be02 + 6731873 commit 695d5cb
Show file tree
Hide file tree
Showing 24 changed files with 6,466 additions and 399 deletions.
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2016 NHN Entertainment Corp.
Copyright (c) 2017 NHN Entertainment Corp.

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

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ It includes several features like `class simulation`, `browser detecting`, `type
* Firefox

## Download/Install
* Bower:
* bower:
* Latest: `bower install tui-code-snippet`
* Each Version: `bower install tui-code-snippet[#tag]`
* npm:
* Latest: `npm install tui-code-snippet`
* Each Version: `npm install tui-code-snippet[@tag]`
* Download: https://github.com/nhnent/tui.code-snippet
10 changes: 3 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
{
"name": "tui-code-snippet",
"authors": [
"NHN Ent. FE dev team(dl_javascript@nhnent.com)"
"NHN Ent. FE dev Lab(dl_javascript@nhnent.com)"
],
"license": "MIT",
"main": "dist/tui-code-snippet.js",
"ignore": [
"**/.*",
".*",
"src",
"bin",
"node_modules",
"bower_components",
"test",
"bower.json",
"conf.json",
"karma.conf.js",
"package.json",
"karma.local.conf.js",
"tutorial"
"webpack.config.js",
"jsdoc.conf.json"
],
"devDependencies": {
"jquery": "~1.8.3"
Expand Down
86 changes: 43 additions & 43 deletions dist/tui-code-snippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ return /******/ (function(modules) { // webpackBootstrap
* FE Development Lab <dl_javascript@nhnent.com>
* @namespace tui.util
*/
var util;
var util = {};
var object = __webpack_require__(1);
var extend = object.extend;

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

module.exports = tui;
module.exports = util;


/***/ }),
Expand Down Expand Up @@ -627,48 +627,48 @@ return /******/ (function(modules) { // webpackBootstrap
* @memberof tui.util
*/
function isEmpty(obj) {
return (!isExisty(obj) ||
(isString(obj) && _isEmptyString(obj)) ||
(isArray(obj) && _isEmptyArray(obj)) ||
(isObject(obj) && (isFunction(obj) || _isEmptyObject(obj)))
);
}
if (!isExisty(obj) || _isEmptyString(obj)) {
return true;
}

/**
* Check string is empty
* @private
* @param {string} str - string
* @returns {boolean} Is empty?
*/
function _isEmptyString(str) {
return str === '';
if (isArray(obj) || isArguments(obj)) {
return obj.length === 0;
}

if (isObject(obj) && !isFunction(obj)) {
return !_hasOwnProperty(obj);
}

return true;
}

/**
* Check array or array like object is empty
* Check whether given argument is empty string
* @param {*} obj - Target for checking
* @returns {boolean} whether given argument is empty string
* @memberof tui.util
* @private
* @param {...Array} arr - array
* @returns {boolean} Is empty?
*/
function _isEmptyArray(arr) {
return arr.length === 0;
function _isEmptyString(obj) {
return isString(obj) && obj === '';
}

/**
* Check object is empty
* Check whether given argument has own property
* @param {Object} obj - Target for checking
* @returns {boolean} - whether given argument has own property
* @memberof tui.util
* @private
* @param {Object} obj - object
* @returns {boolean} Is empty?
*/
function _isEmptyObject(obj) {
function _hasOwnProperty(obj) {
var key;
for (key in obj) {
if (obj.hasOwnProperty(key)) {
return false;
return true;
}
}

return true;
return false;
}

/**
Expand Down Expand Up @@ -825,7 +825,7 @@ return /******/ (function(modules) { // webpackBootstrap

/**
* Returns the first index at which a given element can be found in the array
* from start index(default 0), or -1 if it is not present.
* from start index(default 0), or -1 if it is not present.<br>
* It compares searchElement to elements of the Array using strict equality
* (the same method used by the ===, or triple-equals, operator).
* @param {*} searchElement Element to locate in the array
Expand Down Expand Up @@ -895,8 +895,8 @@ return /******/ (function(modules) { // webpackBootstrap

/**
* Execute the provided callback once for each element present
* in the array(or Array-like object) in ascending order.
* If the callback function returns false, the loop will be stopped.
* in the array(or Array-like object) in ascending order.<br>
* If the callback function returns false, the loop will be stopped.<br>
* Callback function(iteratee) is invoked with three arguments:
* - The value of the element
* - The index of the element
Expand Down Expand Up @@ -999,9 +999,9 @@ return /******/ (function(modules) { // webpackBootstrap

/**
* Execute the provided callback function once for each element in an array, in order,
* and constructs a new array from the results.
* and constructs a new array from the results.<br>
* If the object is Array-like object(ex-arguments object),
* It needs to transform to Array.(see 'ex2' of forEach example)
* It needs to transform to Array.(see 'ex2' of forEach example)<br>
* Callback function(iteratee) is invoked with three arguments:
* - The value of the property(or The value of the element)
* - The name of the property(or The index of the element)
Expand Down Expand Up @@ -1031,9 +1031,9 @@ return /******/ (function(modules) { // webpackBootstrap
}

/**
* Execute the callback function once for each element present in the array(or Array-like object or plain object).
* Execute the callback function once for each element present in the array(or Array-like object or plain object).<br>
* If the object is Array-like object(ex-arguments object),
* It needs to transform to Array.(see 'ex2' of forEach example)
* It needs to transform to Array.(see 'ex2' of forEach example)<br>
* Callback function(iteratee) is invoked with four arguments:
* - The previousValue
* - The currentValue
Expand Down Expand Up @@ -1075,7 +1075,7 @@ return /******/ (function(modules) { // webpackBootstrap
}

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

/**
* Provide a simple inheritance in prototype-oriented.
* Provide a simple inheritance in prototype-oriented.<br>
* Caution :
* Don't overwrite the prototype of child constructor.
*
Expand Down Expand Up @@ -1767,16 +1767,16 @@ return /******/ (function(modules) { // webpackBootstrap
* When transmit the POST-data, some browsers alert a message for confirming whether retransmit or not.
*
* @param {string} [options.postBridgeUrl='']
* - Use this url to avoid a certain bug occuring when transmitting POST data to the popup in IE11.<br>
* This specific buggy situation is known to happen because IE11 tries to open the requested url
* not in a new popup window as intended, but in a new tab.<br>
* See {@link http://wiki.nhnent.com/pages/viewpage.action?pageId=240562844}
* Use this url to avoid a certain bug occuring when transmitting POST data to the popup in IE11.<br>
* This specific buggy situation is known to happen because IE11 tries to open the requested url<br>
* not in a new popup window as intended, but in a new tab.<br>
* See {@link http://wiki.nhnent.com/pages/viewpage.action?pageId=240562844}
*
* @param {string} [options.method=get]
* - The method of transmission when the form-data is transmitted to popup-window.
* The method of transmission when the form-data is transmitted to popup-window.
*
* @param {Object} [options.param=null]
* - Using as parameters for transmission when the form-data is transmitted to popup-window.
* Using as parameters for transmission when the form-data is transmitted to popup-window.
*/
Popup.prototype.openPopup = function(url, options) { // eslint-disable-line complexity
var popup, formElement, useIEPostBridge;
Expand Down Expand Up @@ -3042,7 +3042,7 @@ return /******/ (function(modules) { // webpackBootstrap
* MYENUM.set('TYPE3', 'TYPE4');
*
* //get name of a constant by a value
* MYENUM.getName(MYENUM.TYPE1); // 'TYPE1'이 리턴된다.
* MYENUM.getName(MYENUM.TYPE1); // 'TYPE1'
*
* // In modern browsers (except IE8 and lower), a value can not be changed in constants.
* var originalValue = MYENUM.TYPE1;
Expand Down
2 changes: 1 addition & 1 deletion dist/tui-code-snippet.min.js

Large diffs are not rendered by default.

File renamed without changes.
Loading

0 comments on commit 695d5cb

Please sign in to comment.