JSçéã大é¨ãã«ãªã£ãäºä»¶ã ãã©ããããã£ãäºä»¶èªä½ã¯å®å ¨ã«é²ããã¨ã¯ä¸å¯è½ã ã¨æãã
ä»åã¯ä¾åã©ã¤ãã©ãªãåé¤ãããã ãã§æ¸ãã ãã©ã npm install
ããã ã㧠~/.ssh
ãã£ã¬ã¯ããªã zip ã«ãã¦ã©ããã«éä¿¡ãããããªæªè³ªãªæ»æã§ããã°ãåã«CIãæ¢ã¾ãã©ããã§ãªããä¸çä¸ã®ã¨ã³ã¸ãã¢ã®ç§å¯éµãã°ãã¾ããã¦ãã¡ãã¡ã®ãµã¼ãã¼ã«sshå¯è½ãªäºæ
ã«ãªã£ãããã§ããããªæªè³ªãªæ»æã bugfix ãªãã¤ã¯ããã¼ã¸ã§ã³ã¢ããã¨ãã¦å
¬éãããäºãããããããã ã
第ä¸è ã®ããã±ã¼ã¸ã«ä¾åããã¨ãããã¨ã¯ãããã ãã®ãªã¹ã¯ãèè² ãè¾¼ãã¨ãããã¨ã ãã ããéã«å¤é¨ã®ã©ã¤ãã©ãªã«ä¾åããªãããã«ããã¨ãçç£æ§ãè½ã¡ã¦ãã¾ãã ãªã®ã§ãã³ã¼ããèªããä¿¡é ¼ã§ããã¡ã³ããã®å ¬éãã¦ããããã±ã¼ã¸ãé¸ã¶ãªã©ã¨ãã£ãæ¹æ³ã§ããªã¹ã¯ã¨ã¡ãªããã®ãã©ã³ã¹ãåã£ã¦è¡ããªãã¨ãããªãã
ä¿¡é ¼ã§ããããã±ã¼ã¸ãé¸ã¶æ段ã®ä¸ã¤ã¨ãã¦ãæ¢ã«ä¿¡é ¼ãéãã¦ãã人ãããã¸ã§ã¯ããä¿¡é ¼ãã¦ãããã®ãä¿¡é ¼ããã¨ããæ¹æ³ããããä¾ãã° Babel ã使ããã¨ãé¸æããå ´åã Babel ãä¾åãã¦ãå ¨é¨ã®ããã±ã¼ã¸ãä¿¡é ¼ãã¦èªåã®ãã·ã³ã«ã¤ã³ã¹ãã¼ã«ããã¨ãããã¨ãé¸ãã 訳ã§ããªãèªåã®ããã¸ã§ã¯ãã§ãåãããã±ã¼ã¸ã«ä¾åããã¨ããã®ã¯åççãªé¸æã®ã¯ãã ã
ãã¦ãä»åã®åé¡ã§é©ããã®ã¯ã大混乱ãæãã left-pad ããããç¨åº¦ã®æè¡ãããããã°ã©ããè¦ããä¸ç®ã§ã¯ã½ã³ã¼ãã ã¨å¤æãããããªä»£ç©ã ã£ããã¨ã ã
len = len - str.length; while (++i < len) { str = ch + str; }
渡ãããæåå str ã«ã ch ã§æå®ãããããã£ã³ã°æåãå·¦ã«è¿½å ãããã¨ã§ãæå®ãããé·ãã®æååã«ããï¼å³å¯ãããï¼ã³ã¼ããªã®ã ãããæååã®å·¦å´ã«1æåãã¤è¿½å ãããã³ã¼ããã¯ã½ãªã®ã¯å¤ãã®è¨èªã§å ±éã®èªèã ãããå®éãäºä»¶ã®å¾ãããã©ã¼ãã³ã¹ãæ¹åãããã«ãªã¯ã¨ã¹ãã4件ãç«ã¦ç¶ãã«æ¥ã¦ããã https://github.com/azer/left-pad/pulls
åé¡ã¯ããã£ã17è¡ã®ã³ã¼ãã«ããããªã«æãããªåé¡ãããã®ã«ãäºä»¶ãèµ·ããã¾ã§èª°ã«ãæ°ã¥ãããã«ã Babel ãå§ãã¨ãã大éã®ããã¸ã§ã¯ãã§å©ç¨ããã¦ãããã¨ã ã å㯠JSer ãããªãã®ã§æ¶æ¸¬ã ãããã®éçºè ãJSçã§è¶ æå人ã§ä¿¡é ¼ããã¦ããã¨ãããããããBabelã使ã£ã¦ãããã¨ãã£ãæãã§ã©ãã©ãä¾åãåºã¾ã£ã¦ãã£ãã®ã§ã¯ç¡ãã ãããï¼ Babel ã®ä¸ã®äººã¯ããã¾ã§èãã¦ä¾åããã©ã¤ãã©ãªãé¸ãã§ããã ããããï¼Babelãããå ã« left-pad ã«ä¾åãã¦ããæåããã¸ã§ã¯ãããã£ããããããªããï¼
å¤é¨ã®ããã±ã¼ã¸ã«ä¾åãããã¨ã«ã¯å¤§ããªãªã¹ã¯ãæããã¨ãèªèããä¸ã§ãããã§ãå©ç¨ãããã¨ã§å¾ãããã¡ãªãããä¸åã£ã¦ããããè¯ãèãããã
ç¹ã«å¤ãã®äººã«å©ç¨ãããOSSããã¸ã§ã¯ãã§ã¯ããã®ã¡ãªããã»ãã¡ãªããããã®ããã¸ã§ã¯ãã ãã§ãªãã³ãã¥ããã£å ¨ä½ã«ãâ¯â¯ã使ã£ã¦ãããã¦ãã使ãããã¨ããåºæºã§åºã¾ããã¨ã¾ã§èãã¦ãããå³é¸ãããã
ã§ããã°ä¾åããã©ã¤ãã©ãªã®ã³ã¼ããèªãã§ãä»äººã«ããããã§ããã³ã¼ããã©ãã確ãããããã§ãªããªãããè¯ãå¥ã®ã©ã¤ãã©ãªãæ¢ããªãããã«ãªã¯ã¨ã¹ããåºããªããããã