|
|
@ -1,5 +1,5 @@ |
|
|
|
/** |
|
|
|
* JSXTransformer v0.13.1 |
|
|
|
* JSXTransformer v0.13.2 |
|
|
|
*/ |
|
|
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ |
|
|
|
/** |
|
|
@ -502,8 +502,9 @@ Buffer.TYPED_ARRAY_SUPPORT = (function () { |
|
|
|
* By augmenting the instances, we can avoid modifying the `Uint8Array` |
|
|
|
* prototype. |
|
|
|
*/ |
|
|
|
function Buffer (subject, encoding, noZero) { |
|
|
|
if (!(this instanceof Buffer)) return new Buffer(subject, encoding, noZero) |
|
|
|
function Buffer (subject, encoding) { |
|
|
|
var self = this |
|
|
|
if (!(self instanceof Buffer)) return new Buffer(subject, encoding) |
|
|
|
|
|
|
|
var type = typeof subject |
|
|
|
var length |
|
|
@ -528,12 +529,9 @@ function Buffer (subject, encoding, noZero) { |
|
|
|
if (length < 0) length = 0 |
|
|
|
else length >>>= 0 // coerce to uint32
|
|
|
|
|
|
|
|
var self = this |
|
|
|
if (Buffer.TYPED_ARRAY_SUPPORT) { |
|
|
|
// Preferred: Return an augmented `Uint8Array` instance for best performance
|
|
|
|
/*eslint-disable consistent-this */ |
|
|
|
self = Buffer._augment(new Uint8Array(length)) |
|
|
|
/*eslint-enable consistent-this */ |
|
|
|
self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this
|
|
|
|
} else { |
|
|
|
// Fallback: Return THIS instance of Buffer (created by `new`)
|
|
|
|
self.length = length |
|
|
@ -557,7 +555,7 @@ function Buffer (subject, encoding, noZero) { |
|
|
|
} |
|
|
|
} else if (type === 'string') { |
|
|
|
self.write(subject, 0, encoding) |
|
|
|
} else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) { |
|
|
|
} else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) { |
|
|
|
for (i = 0; i < length; i++) { |
|
|
|
self[i] = 0 |
|
|
|
} |
|
|
@ -568,10 +566,10 @@ function Buffer (subject, encoding, noZero) { |
|
|
|
return self |
|
|
|
} |
|
|
|
|
|
|
|
function SlowBuffer (subject, encoding, noZero) { |
|
|
|
if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding, noZero) |
|
|
|
function SlowBuffer (subject, encoding) { |
|
|
|
if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) |
|
|
|
|
|
|
|
var buf = new Buffer(subject, encoding, noZero) |
|
|
|
var buf = new Buffer(subject, encoding) |
|
|
|
delete buf.parent |
|
|
|
return buf |
|
|
|
} |
|
|
@ -619,7 +617,7 @@ Buffer.isEncoding = function isEncoding (encoding) { |
|
|
|
} |
|
|
|
|
|
|
|
Buffer.concat = function concat (list, totalLength) { |
|
|
|
if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])') |
|
|
|
if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') |
|
|
|
|
|
|
|
if (list.length === 0) { |
|
|
|
return new Buffer(0) |
|
|
@ -1012,7 +1010,7 @@ Buffer.prototype.slice = function slice (start, end) { |
|
|
|
newBuf = Buffer._augment(this.subarray(start, end)) |
|
|
|
} else { |
|
|
|
var sliceLen = end - start |
|
|
|
newBuf = new Buffer(sliceLen, undefined, true) |
|
|
|
newBuf = new Buffer(sliceLen, undefined) |
|
|
|
for (var i = 0; i < sliceLen; i++) { |
|
|
|
newBuf[i] = this[i + start] |
|
|
|
} |
|
|
@ -1456,8 +1454,6 @@ Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert |
|
|
|
|
|
|
|
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
|
|
|
Buffer.prototype.copy = function copy (target, target_start, start, end) { |
|
|
|
var self = this // source
|
|
|
|
|
|
|
|
if (!start) start = 0 |
|
|
|
if (!end && end !== 0) end = this.length |
|
|
|
if (target_start >= target.length) target_start = target.length |
|
|
@ -1466,13 +1462,13 @@ Buffer.prototype.copy = function copy (target, target_start, start, end) { |
|
|
|
|
|
|
|
// Copy 0 bytes; we're done
|
|
|
|
if (end === start) return 0 |
|
|
|
if (target.length === 0 || self.length === 0) return 0 |
|
|
|
if (target.length === 0 || this.length === 0) return 0 |
|
|
|
|
|
|
|
// Fatal error conditions
|
|
|
|
if (target_start < 0) { |
|
|
|
throw new RangeError('targetStart out of bounds') |
|
|
|
} |
|
|
|
if (start < 0 || start >= self.length) throw new RangeError('sourceStart out of bounds') |
|
|
|
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') |
|
|
|
if (end < 0) throw new RangeError('sourceEnd out of bounds') |
|
|
|
|
|
|
|
// Are we oob?
|
|
|
@ -1557,8 +1553,7 @@ Buffer._augment = function _augment (arr) { |
|
|
|
arr.constructor = Buffer |
|
|
|
arr._isBuffer = true |
|
|
|
|
|
|
|
// save reference to original Uint8Array get/set methods before overwriting
|
|
|
|
arr._get = arr.get |
|
|
|
// save reference to original Uint8Array set method before overwriting
|
|
|
|
arr._set = arr.set |
|
|
|
|
|
|
|
// deprecated, will be removed in node 0.13+
|
|
|
|