Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "jschardet", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Character encoding auto-detection in JavaScript (port of python's chardet)", | ||
@@ -5,0 +5,0 @@ "main": "src/init", |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -52,2 +52,2 @@ jschardet.Big5Prober = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -284,2 +284,2 @@ jschardet.CharDistributionAnalysis = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -119,2 +119,2 @@ jschardet.CharSetGroupProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -69,2 +69,2 @@ jschardet.CharSetProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -72,2 +72,2 @@ jschardet.CodingStateMachine = function(sm) { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -47,2 +47,2 @@ jschardet.Constants = { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -99,2 +99,2 @@ jschardet.EscCharSetProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -257,2 +257,2 @@ jschardet.HZ_cls = [ | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -103,2 +103,2 @@ jschardet.EUCJPProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -602,2 +602,2 @@ // Sampling from about 20M text materials include literature and computer technology | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -52,2 +52,2 @@ jschardet.EUCKRProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -434,2 +434,2 @@ // EUCTW frequency table | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -52,2 +52,2 @@ jschardet.EUCTWProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -478,2 +478,2 @@ // GB2312 most frequently used character table | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -52,2 +52,2 @@ jschardet.GB2312Prober = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -323,2 +323,2 @@ // This prober doesn't actually recognize a language or a charset. | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,38 +30,42 @@ /* | ||
var jschardet = exports; | ||
var jschardet = {}; | ||
require('./constants')(jschardet); | ||
require('./codingstatemachine')(jschardet); | ||
require('./escsm')(jschardet); | ||
require('./mbcssm')(jschardet); | ||
require('./charsetprober')(jschardet); | ||
require('./mbcharsetprober')(jschardet); | ||
require('./jisfreq')(jschardet); | ||
require('./gb2312freq')(jschardet); | ||
require('./euckrfreq')(jschardet); | ||
require('./big5freq')(jschardet); | ||
require('./euctwfreq')(jschardet); | ||
require('./chardistribution')(jschardet); | ||
require('./jpcntx')(jschardet); | ||
require('./sjisprober')(jschardet); | ||
require('./utf8prober')(jschardet); | ||
require('./charsetgroupprober')(jschardet); | ||
require('./eucjpprober')(jschardet); | ||
require('./gb2312prober')(jschardet); | ||
require('./euckrprober')(jschardet); | ||
require('./big5prober')(jschardet); | ||
require('./euctwprober')(jschardet); | ||
require('./mbcsgroupprober')(jschardet); | ||
require('./sbcharsetprober')(jschardet); | ||
require('./langgreekmodel')(jschardet); | ||
require('./langthaimodel')(jschardet); | ||
require('./langbulgarianmodel')(jschardet); | ||
require('./langcyrillicmodel')(jschardet); | ||
require('./hebrewprober')(jschardet); | ||
require('./langhebrewmodel')(jschardet); | ||
require('./langhungarianmodel')(jschardet); | ||
require('./sbcsgroupprober')(jschardet); | ||
require('./latin1prober')(jschardet); | ||
require('./escprober')(jschardet); | ||
require('./universaldetector')(jschardet); | ||
if (typeof process !== 'undefined' && typeof process.title !== 'undefined') | ||
{ | ||
jschardet = exports; | ||
require('./constants'); | ||
require('./codingstatemachine'); | ||
require('./escsm'); | ||
require('./mbcssm'); | ||
require('./charsetprober'); | ||
require('./mbcharsetprober'); | ||
require('./jisfreq'); | ||
require('./gb2312freq'); | ||
require('./euckrfreq'); | ||
require('./big5freq'); | ||
require('./euctwfreq'); | ||
require('./chardistribution'); | ||
require('./jpcntx'); | ||
require('./sjisprober'); | ||
require('./utf8prober'); | ||
require('./charsetgroupprober'); | ||
require('./eucjpprober'); | ||
require('./gb2312prober'); | ||
require('./euckrprober'); | ||
require('./big5prober'); | ||
require('./euctwprober'); | ||
require('./mbcsgroupprober'); | ||
require('./sbcharsetprober'); | ||
require('./langgreekmodel'); | ||
require('./langthaimodel'); | ||
require('./langbulgarianmodel'); | ||
require('./langcyrillicmodel'); | ||
require('./hebrewprober'); | ||
require('./langhebrewmodel'); | ||
require('./langhungarianmodel'); | ||
require('./sbcsgroupprober'); | ||
require('./latin1prober'); | ||
require('./escprober'); | ||
require('./universaldetector'); | ||
} | ||
@@ -72,3 +76,3 @@ jschardet.VERSION = "0.1"; | ||
u.reset(); | ||
if( buffer instanceof Buffer ) { | ||
if( typeof Buffer == 'function' && buffer instanceof Buffer ) { | ||
var str = ""; | ||
@@ -75,0 +79,0 @@ for (var i = 0; i < buffer.length; ++i) |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -574,2 +574,2 @@ // Sampling from about 20M text materials include literature and computer technology | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -243,2 +243,2 @@ // This is hiragana 2-char sequence table, the number in each cell represents its frequency category | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -233,2 +233,2 @@ // 255: Control characters that usually does not exist in any text | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -334,2 +334,2 @@ // KOI8-R language model | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -230,2 +230,2 @@ // 255: Control characters that usually does not exist in any text | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -204,2 +204,2 @@ // 255: Control characters that usually does not exist in any text | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -230,2 +230,2 @@ // 255: Control characters that usually does not exist in any text | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -205,2 +205,2 @@ // 255: Control characters that usually does not exist in any text | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -164,2 +164,2 @@ (function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -102,2 +102,2 @@ jschardet.MultiByteCharSetProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -48,2 +48,2 @@ jschardet.MBCSGroupProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -564,2 +564,2 @@ // BIG5 | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -140,2 +140,2 @@ jschardet.SingleByteCharSetProber = function(model, reversed, nameProber) { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -67,2 +67,2 @@ jschardet.SBCSGroupProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -102,2 +102,2 @@ jschardet.SJISProber = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -34,3 +34,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -160,3 +160,5 @@ jschardet.UniversalDetector = function() { | ||
if( this._mInputState == _state.pureAscii ) { | ||
console.log("pure ascii") | ||
if( jschardet.Constants._debug ) { | ||
console.log("pure ascii") | ||
} | ||
this.result = {"encoding": "ascii", "confidence": 1.0}; | ||
@@ -203,2 +205,2 @@ return this.result; | ||
}; | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
@@ -30,3 +30,3 @@ /* | ||
module.exports = function(jschardet) { | ||
!function(jschardet) { | ||
@@ -96,2 +96,2 @@ jschardet.UTF8Prober = function() { | ||
} | ||
}((typeof process !== 'undefined' && typeof process.title !== 'undefined') ? module.parent.exports : jschardet); |
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
534550
43
8620