Comparing version 0.7.0 to 0.7.1
@@ -9,8 +9,2 @@ /** | ||
} | ||
export declare var Buffer: { | ||
new (str: string, encoding?: string): Buffer; | ||
new (size: number): Buffer; | ||
byteLength(string: string, encoding?: string): number; | ||
concat(list: Buffer[], totalLength?: number): Buffer; | ||
}; | ||
export interface Source { | ||
@@ -17,0 +11,0 @@ /** |
10
index.js
@@ -16,3 +16,3 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
BufferIterator.fromString = function (str, encoding) { | ||
var buffer = new exports.Buffer(str, encoding); | ||
var buffer = new Buffer(str, encoding); | ||
return new BufferIterator(buffer); | ||
@@ -168,3 +168,3 @@ }; | ||
this._block_size = _block_size; | ||
this._buffer = new exports.Buffer(0); | ||
this._buffer = new Buffer(0); | ||
} | ||
@@ -198,3 +198,3 @@ Object.defineProperty(BufferedSourceReader.prototype, "position", { | ||
BufferedSourceReader.prototype._fillBuffer = function (length) { | ||
var buffer = new exports.Buffer(length); | ||
var buffer = new Buffer(length); | ||
// always read from the current position | ||
@@ -205,3 +205,3 @@ var bytesRead = this._source.read(buffer, 0, length, this._position); | ||
// use the Buffer.concat totalLength argument to slice the fresh buffer if needed | ||
this._buffer = exports.Buffer.concat([this._buffer, buffer], this._buffer.length + bytesRead); | ||
this._buffer = Buffer.concat([this._buffer, buffer], this._buffer.length + bytesRead); | ||
return bytesRead < length; | ||
@@ -302,3 +302,3 @@ }; | ||
// to advance the underlying buffer appropriately | ||
var byteLength = exports.Buffer.byteLength(str, this._encoding); | ||
var byteLength = Buffer.byteLength(str, this._encoding); | ||
// we cannot skip more than `this._buffer.length` bytes | ||
@@ -305,0 +305,0 @@ // var bytesSkipped = Math.min(byteLength, this._buffer.length); // is this necessary? |
{ | ||
"name": "lexing", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Regex-based lexer", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53542
1156