adbkit-logcat
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,3 @@ | ||
'use strict' | ||
const Reader = require('./logcat/reader') | ||
@@ -2,0 +4,0 @@ const Priority = require('./logcat/priority') |
@@ -0,1 +1,3 @@ | ||
'use strict' | ||
class Entry { | ||
@@ -2,0 +4,0 @@ constructor() { |
@@ -1,3 +0,5 @@ | ||
const {EventEmitter} = require('events') | ||
'use strict' | ||
const EventEmitter = require('events').EventEmitter | ||
const Entry = require('../entry') | ||
@@ -59,9 +61,7 @@ | ||
const {length} = data | ||
let cursor = 1 | ||
while (cursor < length) { | ||
while (cursor < data.length) { | ||
if (data[cursor] === 0) { | ||
entry.setTag(data.slice(1, cursor).toString()) | ||
entry.setMessage(data.slice(cursor + 1, length - 1).toString()) | ||
entry.setMessage(data.slice(cursor + 1, data.length - 1).toString()) | ||
this.emit('entry', entry) | ||
@@ -68,0 +68,0 @@ return |
@@ -0,1 +1,3 @@ | ||
'use strict' | ||
const codes = { | ||
@@ -2,0 +4,0 @@ UNKNOWN: 0, |
@@ -1,3 +0,5 @@ | ||
const {EventEmitter} = require('events') | ||
'use strict' | ||
const EventEmitter = require('events').EventEmitter | ||
const BinaryParser = require('./parser/binary') | ||
@@ -10,3 +12,3 @@ const Transform = require('./transform') | ||
class Reader extends EventEmitter { | ||
constructor(options = {}) { | ||
constructor(options) { | ||
super(options) | ||
@@ -16,3 +18,4 @@ | ||
format: 'binary', | ||
fixLineFeeds: true | ||
fixLineFeeds: true, | ||
priority: Priority.DEBUG | ||
} | ||
@@ -49,3 +52,7 @@ | ||
include(tag, priority = Priority.DEBUG) { | ||
include(tag, priority) { | ||
if (typeof priority === 'undefined') { | ||
priority = this.options.priority | ||
} | ||
if (tag === Reader.ANY) { | ||
@@ -59,3 +66,7 @@ return this.includeAll(priority) | ||
includeAll(priority = Priority.DEBUG) { | ||
includeAll(priority) { | ||
if (typeof priority === 'undefined') { | ||
priority = this.options.priority | ||
} | ||
this.filters.all = this._priority(priority) | ||
@@ -62,0 +73,0 @@ return this |
@@ -0,1 +1,3 @@ | ||
'use strict' | ||
const stream = require('stream') | ||
@@ -2,0 +4,0 @@ |
{ | ||
"name": "adbkit-logcat", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A Node.js interface for working with Android's logcat output.", | ||
@@ -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
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
17838
357
0