Comparing version 1.2.0 to 1.3.0
19
index.js
@@ -41,2 +41,21 @@ var detect = require('charset-detector') | ||
function toutf8sync (buf, opts) { | ||
if (!opts) opts = {} | ||
opts.detectSize = buf.length | ||
opts.newline = false | ||
var stream = toutf8(opts) | ||
stream.write(buf) | ||
stream.end() | ||
var output = [] | ||
var next = null | ||
while (next = stream.read()) output.push(next) | ||
return Buffer.concat(output) | ||
} | ||
toutf8.sync = toutf8sync | ||
module.exports = toutf8 |
{ | ||
"name": "to-utf-8", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Detect input encoding and convert to utf-8 if needed", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
4837
84