만약 이전에 NPM author 정보를 설정해놓지 않았다면, 다음 명령으로 등록하세요:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
import {Suite} from 'benchmark'; | |
const suite = new Suite(); | |
suite | |
.add('Array Spread Operator', () => { | |
const a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]; | |
const b = [...a]; | |
}) | |
.add('Array.from()', () => { |
// encode | |
'foo © bar ≠ baz 𝌆 qux'.replace(/[\u{00A0}-\u{10FFFF}<>\&]/gmiu, (char) => `&#x${char.codePointAt(0).toString(16)};`); |
만약 이전에 NPM author 정보를 설정해놓지 않았다면, 다음 명령으로 등록하세요:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
Babel은 최신 ES(2015/NEXT)
표준에 맞춰 작성된 코드를 아직 표준 기능을 구현하지 않은 브라우저와 플랫폼에서도 코드가 작동할 수 있도록 만들어주는 코드 transpiler
와 polyfill
도구의 집합입니다.
Babel 6.x 버전부턴 많은 기능이 추가되었고 운용 방식이 설정(config
) 기반 방식으로 바뀌었습니다.
/** | |
* Creates a new Uint8Array based on two different ArrayBuffers | |
* | |
* @private | |
* @param {ArrayBuffers} buffer1 The first buffer. | |
* @param {ArrayBuffers} buffer2 The second buffer. | |
* @return {ArrayBuffers} The new ArrayBuffer created out of the two. | |
*/ | |
var _appendBuffer = function(buffer1, buffer2) { | |
var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); |
import Promise from 'bluebird'; | |
import EventEmitter from 'eventemitter3'; | |
class InlineWorker { | |
constructor(source) { | |
if (typeof source != 'function') { | |
throw new TypeError('source must be a function'); | |
} | |
if (this._worker) { |