build/JSXTransformer.js in react-source-0.13.1 vs build/JSXTransformer.js in react-source-0.13.2

- old
+ new

@@ -1,7 +1,7 @@ /** - * 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){ /** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. @@ -500,12 +500,13 @@ * a single octet. * * 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 if (type === 'number') { @@ -526,16 +527,13 @@ } 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 self._isBuffer = true } @@ -555,25 +553,25 @@ self[i] = ((subject[i] % 256) + 256) % 256 } } } 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 } } if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent 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 } Buffer.isBuffer = function isBuffer (b) { @@ -617,11 +615,11 @@ return false } } 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) } else if (list.length === 1) { return list[0] @@ -1010,11 +1008,11 @@ var newBuf if (Buffer.TYPED_ARRAY_SUPPORT) { 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] } } @@ -1454,27 +1452,25 @@ return writeDouble(this, value, offset, false, 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 if (!target_start) target_start = 0 if (end > 0 && end < start) end = start // 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? if (end > this.length) end = this.length if (target.length - target_start < end - start) { @@ -1555,11 +1551,10 @@ */ 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+ arr.get = BP.get arr.set = BP.set \ No newline at end of file