Comparing version 0.2.0 to 1.0.0
@@ -5,5 +5,5 @@ /// <reference types="node" /> | ||
import { FileTokenizer } from "./FileTokenizer"; | ||
import * as stream from "stream"; | ||
import * as Stream from "stream"; | ||
/** | ||
* Used to reject read if end-of-stream or end-of-file is reached | ||
* Used to reject read if end-of-Stream or end-of-file is reached | ||
* @type {Error} | ||
@@ -35,8 +35,8 @@ */ | ||
/** | ||
* Construct ReadStreamTokenizer from given stream. | ||
* Will set fileSize, if provided given stream has set the .path property/ | ||
* @param stream stream.Readable | ||
* Construct ReadStreamTokenizer from given Stream. | ||
* Will set fileSize, if provided given Stream has set the .path property/ | ||
* @param stream Stream.Readable | ||
* @returns {Promise<ReadStreamTokenizer>} | ||
*/ | ||
export declare function fromStream(stream: stream.Readable): Promise<ReadStreamTokenizer>; | ||
export declare function fromStream(stream: Stream.Readable): Promise<ReadStreamTokenizer>; | ||
/** | ||
@@ -43,0 +43,0 @@ * Construct ReadStreamTokenizer from given file path. |
@@ -7,3 +7,3 @@ "use strict"; | ||
/** | ||
* Used to reject read if end-of-stream or end-of-file is reached | ||
* Used to reject read if end-of-Stream or end-of-file is reached | ||
* @type {Error} | ||
@@ -27,5 +27,5 @@ */ | ||
/** | ||
* Construct ReadStreamTokenizer from given stream. | ||
* Will set fileSize, if provided given stream has set the .path property/ | ||
* @param stream stream.Readable | ||
* Construct ReadStreamTokenizer from given Stream. | ||
* Will set fileSize, if provided given Stream has set the .path property/ | ||
* @param stream Stream.Readable | ||
* @returns {Promise<ReadStreamTokenizer>} | ||
@@ -32,0 +32,0 @@ */ |
/// <reference types="node" /> | ||
import { AbstractTokenizer } from "./AbstractTokenizer"; | ||
import * as stream from "stream"; | ||
import * as Stream from "stream"; | ||
export declare class ReadStreamTokenizer extends AbstractTokenizer { | ||
private streamReader; | ||
constructor(stream: stream.Readable, fileSize?: number); | ||
constructor(stream: Stream.Readable, fileSize?: number); | ||
readBuffer(buffer: Buffer, offset: number, length: number, position?: number): Promise<number>; | ||
ignore(length: number): Promise<void>; | ||
} |
@@ -36,3 +36,3 @@ "use strict"; | ||
var buf = new Buffer(length); | ||
return this.streamReader.read(buf, 0, length).then(function () { return null; }); // stream cannot skip data | ||
return this.streamReader.read(buf, 0, length).then(function () { return null; }); // Stream cannot skip data | ||
}; | ||
@@ -39,0 +39,0 @@ return ReadStreamTokenizer; |
{ | ||
"name": "strtok3", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "A promise based streaming tokenizer", | ||
@@ -10,3 +10,3 @@ "author": { | ||
"scripts": { | ||
"compile": "tsc", | ||
"compile": "gulp compile && gulp test-compile", | ||
"clean": "gulp clean", | ||
@@ -16,3 +16,4 @@ "mocha": "mocha --require ts-node/register test", | ||
"lint": "tslint 'src/**/*.ts' 'test/**/*.ts'", | ||
"test": "gulp test" | ||
"test": "gulp test", | ||
"coveralls": "nyc npm run mocha && nyc report --reporter=text-lcov | coveralls" | ||
}, | ||
@@ -26,3 +27,3 @@ "engines": { | ||
}, | ||
"license": "BSD-3-Clause", | ||
"license": "MIT", | ||
"main": "./lib/index.js", | ||
@@ -38,4 +39,5 @@ "typings": "lib/index", | ||
"@types/mocha": "^2.2.41", | ||
"@types/node": "^7.0.33", | ||
"chai": "^4.0.2", | ||
"@types/node": "^7.0.37", | ||
"chai": "^4.1.0", | ||
"coveralls": "^2.13.1", | ||
"debug": "^2.6.8", | ||
@@ -48,6 +50,7 @@ "gulp": "^3.9.1", | ||
"mocha": "^3.4.2", | ||
"ts-node": "^3.1.0", | ||
"tslint": "^5.4.3", | ||
"nyc": "^11.0.3", | ||
"ts-node": "^3.2.0", | ||
"tslint": "^5.5.0", | ||
"typescript": "^2.4.1", | ||
"typings": "2.0.0" | ||
"typings": "^2.1.1" | ||
}, | ||
@@ -58,3 +61,3 @@ "dependencies": { | ||
"then-read-stream": "^0.1.0", | ||
"token-types": "0.0.2" | ||
"token-types": "^0.1.1" | ||
}, | ||
@@ -61,0 +64,0 @@ "keywords": [ |
@@ -1,2 +0,6 @@ | ||
[![Build Status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url] [![npm downloads][npm-downloads-image]][npm-url] | ||
[![Build Status](https://travis-ci.org/Borewit/strtok3.svg?branch=master)](https://travis-ci.org/Borewit/strtok3) | ||
[![NPM version](https://badge.fury.io/js/strtok3.svg)](https://npmjs.org/package/strtok3) | ||
[![npm downloads](http://img.shields.io/npm/dm/strtok3.svg)](https://npmjs.org/package/strtok3) | ||
[![Dependencies](https://david-dm.org/Borewit/strtok3.svg)](https://david-dm.org/Borewit/strtok3) | ||
[![Coverage Status](https://coveralls.io/repos/github/Borewit/strtok3/badge.svg?branch=master)](https://coveralls.io/github/Borewit/strtok3?branch=master) | ||
@@ -80,8 +84,1 @@ A promise based streaming tokenizer for [NodeJS](http://nodejs.org). | ||
``` | ||
[npm-url]: https://npmjs.org/package/strtok3 | ||
[npm-image]: https://badge.fury.io/js/strtok3.svg | ||
[npm-downloads-image]: http://img.shields.io/npm/dm/strtok3.svg | ||
[travis-url]: https://travis-ci.org/profile/Borewit/strtok3 | ||
[travis-image]: https://api.travis-ci.org/Borewit/strtok3.svg?branch=master |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
306253
7585
1
0
19
84
+ Addedtoken-types@0.1.2(transitive)
- Removedtoken-types@0.0.2(transitive)
Updatedtoken-types@^0.1.1