Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "jschardet", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Character encoding auto-detection in JavaScript (port of python's chardet)", | ||
@@ -5,0 +5,0 @@ "main": "src/init", |
@@ -97,3 +97,3 @@ /* | ||
if( jschardet.Constants._debug ) { | ||
log(prober.getCharsetName() + " not active\n"); | ||
jschardet.log(prober.getCharsetName() + " not active\n"); | ||
} | ||
@@ -104,3 +104,3 @@ continue; | ||
if( jschardet.Constants._debug ) { | ||
log(prober.getCharsetName() + " confidence = " + cf + "\n"); | ||
jschardet.log(prober.getCharsetName() + " confidence = " + cf + "\n"); | ||
} | ||
@@ -107,0 +107,0 @@ if( bestConf < cf ) { |
@@ -59,3 +59,3 @@ /* | ||
if( jschardet.Constants._debug ) { | ||
log(this.getCharsetName() + " prober hit error at byte " + i + "\n"); | ||
jschardet.log(this.getCharsetName() + " prober hit error at byte " + i + "\n"); | ||
} | ||
@@ -62,0 +62,0 @@ this._mState = jschardet.Constants.notMe; |
@@ -18,3 +18,3 @@ /* | ||
* version 2.1 of the License, or (at your option) any later version. | ||
* | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
@@ -24,3 +24,3 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* Lesser General Public License for more details. | ||
* | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
@@ -88,1 +88,4 @@ * License along with this library; if not, write to the Free Software | ||
} | ||
jschardet.log = function() { | ||
console.log.apply(console, arguments); | ||
} |
@@ -65,3 +65,3 @@ /* | ||
if( jschardet.Constants._debug ) { | ||
log(this.getCharsetName() + " prober hit error at byte " + i + "\n"); | ||
jschardet.log(this.getCharsetName() + " prober hit error at byte " + i + "\n"); | ||
} | ||
@@ -68,0 +68,0 @@ this._mState = jschardet.Constants.notMe; |
@@ -105,7 +105,7 @@ /* | ||
if( jschardet.Constants._debug ) { | ||
log(this._mModel.charsetName + " confidence = " + cf + ", we have a winner\n"); | ||
jschardet.log(this._mModel.charsetName + " confidence = " + cf + ", we have a winner\n"); | ||
} | ||
} else if( cf < NEGATIVE_SHORTCUT_THRESHOLD ) { | ||
if( jschardet.Constants._debug ) { | ||
log(this._mModel.charsetName + " confidence = " + cf + ", below negative shortcut threshhold " + NEGATIVE_SHORTCUT_THRESHOLD + "\n"); | ||
jschardet.log(this._mModel.charsetName + " confidence = " + cf + ", below negative shortcut threshhold " + NEGATIVE_SHORTCUT_THRESHOLD + "\n"); | ||
} | ||
@@ -123,5 +123,5 @@ this._mState = jschardet.Constants.notMe; | ||
if( this._mTotalSeqs > 0 ) { | ||
//log(this._mSeqCounters[POSITIVE_CAT] + " " + this._mTotalSeqs + " " + this._mModel.mTypicalPositiveRatio); | ||
//jschardet.log(this._mSeqCounters[POSITIVE_CAT] + " " + this._mTotalSeqs + " " + this._mModel.mTypicalPositiveRatio); | ||
r = (1.0 * this._mSeqCounters[POSITIVE_CAT]) / this._mTotalSeqs / this._mModel.mTypicalPositiveRatio; | ||
//log(r + " " + this._mFreqChar + " " + this._mTotalChar); | ||
//jschardet.log(r + " " + this._mFreqChar + " " + this._mTotalChar); | ||
r *= this._mFreqChar / this._mTotalChar; | ||
@@ -128,0 +128,0 @@ if( r >= 1.0 ) { |
@@ -59,3 +59,3 @@ /* | ||
if( jschardet.Constants._debug ) { | ||
log(this.getCharsetName() + " prober hit error at byte " + i + "\n"); | ||
jschardet.log(this.getCharsetName() + " prober hit error at byte " + i + "\n"); | ||
} | ||
@@ -62,0 +62,0 @@ this._mState = jschardet.Constants.notMe; |
@@ -159,3 +159,3 @@ /* | ||
if( jschardet.Constants._debug ) { | ||
console.log("no data received!\n"); | ||
jschardet.log("no data received!\n"); | ||
} | ||
@@ -168,3 +168,3 @@ return; | ||
if( jschardet.Constants._debug ) { | ||
console.log("pure ascii") | ||
jschardet.log("pure ascii") | ||
} | ||
@@ -187,3 +187,3 @@ this.result = {"encoding": "ascii", "confidence": 1.0}; | ||
if( jschardet.Constants._debug ) { | ||
console.log(prober.getCharsetName() + " confidence " + prober.getConfidence()); | ||
jschardet.log(prober.getCharsetName() + " confidence " + prober.getConfidence()); | ||
} | ||
@@ -201,6 +201,6 @@ } | ||
if( jschardet.Constants._debug ) { | ||
console.log("no probers hit minimum threshhold\n"); | ||
jschardet.log("no probers hit minimum threshhold\n"); | ||
for( var i = 0, prober; prober = this._mCharsetProbers[i]; i++ ) { | ||
if( !prober ) continue; | ||
console.log(prober.getCharsetName() + " confidence = " + | ||
jschardet.log(prober.getCharsetName() + " confidence = " + | ||
prober.getConfidence() + "\n"); | ||
@@ -207,0 +207,0 @@ } |
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
539739
233723
8630