ECMAScript 2017 (ECMA-262 8th edition) 既定の String.prototype.padStart
及び String.prototype.padEnd
の Polyfill(互換コード)を提供します。
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 characters
/** | |
* poker.js | |
* | |
* @version 0.1.1 | |
* @author think49 | |
* @url https://gist.github.com/think49/39c020a54939513cb2fd | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ | |
'use strict'; |
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 characters
/** | |
* to-absolute-url.js | |
* | |
* @version 1.0.1 | |
* @author think49 | |
* @url https://gist.github.com/think49/1e8944a19a36dd57c829 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ | |
'use strict'; |
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 characters
/** | |
* insert-comma-delimiter.js | |
* Insert commas in a numeric string. | |
* | |
* @version 1.0.1 | |
* @author think49 | |
* @url https://gist.github.com/think49/c13758815bc0af4b19e3 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ |
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 characters
/** | |
* getchartypeat.js | |
* Get the character type (Alphabet, Hiragana, Katakana). | |
* | |
* @version 1.0.3 | |
* @author think49 | |
* @url https://gist.github.com/think49/7728995 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
*/ | |
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 characters
/** | |
* escaperegexpchar.js | |
* Escape the regular expression string (ES5 compliant). | |
* Escape string can be passed to the () new RegExp(). | |
* | |
* @version 1.0.2 | |
* @author think49 | |
* @url https://gist.github.com/think49/7691225 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
* @see <a href="http://es5.github.io/#x15.10.1">15.10.1 Patterns - Annotated ES5.1</a> |
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 characters
// strict check | |
// | |
function strict () { | |
'use strict'; | |
var isStrict = (function () { return typeof this === 'undefined'; }()); | |
console.log(isStrict); | |
} | |
function nonStrict () { |
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 characters
/** | |
* parse-object-literal.js | |
* parseObjectLiteral function returns an object, by parsing "ObjectLiteral". | |
* However, this function is simple. It isn't based upon the part of ES5. | |
* | |
* @version 1.0.1b | |
* @author think49 | |
* @url https://gist.github.com/1595411 | |
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License) | |
* @see <a href="http://es5.github.com/#x11.1.5">11.1.5 Object Initialiser - Annotated ES5</a> |
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 characters
/** | |
* is-textcontent-of-script.js | |
* | |
* @version 1.0.1 | |
* @author think49 | |
* @see <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-1.html#restrictions-for-contents-of-script-elements">4.3.1.2 Restrictions for contents of script elements - HTML5 Standard</a> | |
*/ | |
'use strict'; |
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 characters
/** | |
* iframe-auto-adjust.js | |
* | |
* @version 1.0.1 | |
* @author think49 | |
* @url https://gist.github.com/1151313 | |
*/ | |
'use strict'; | |
(function () { |