Comparing version 0.1.2 to 0.1.3
@@ -26,3 +26,3 @@ module.exports = function() { | ||
if (!arguments.length) return String.fromCharCode(delimiterCode); | ||
if (buffer != null) throw new Error("cannot change delimiter after pushing data"); | ||
if (bufferLength > 0) throw new Error("cannot change delimiter after pushing data"); | ||
if ((newDelimiter += "").length !== 1) throw new Error("invalid delimiter: " + newDelimiter); | ||
@@ -35,3 +35,3 @@ delimiterCode = newDelimiter.charCodeAt(0); | ||
if (!arguments.length) return encoding; | ||
if (buffer != null) throw new Error("cannot change encoding after pushing data"); | ||
if (bufferLength > 0) throw new Error("cannot change encoding after pushing data"); | ||
if (!Buffer.isEncoding(newEncoding = newEncoding + "")) throw new Error("unknown encoding: " + newEncoding); | ||
@@ -38,0 +38,0 @@ encoding = newEncoding; |
@@ -16,3 +16,3 @@ module.exports = function() { | ||
if (!arguments.length) return encoding; | ||
if (buffer != null) throw new Error("cannot change encoding after pushing data"); | ||
if (bufferLength > 0) throw new Error("cannot change encoding after pushing data"); | ||
if (!Buffer.isEncoding(newEncoding = newEncoding + "")) throw new Error("unknown encoding: " + newEncoding); | ||
@@ -19,0 +19,0 @@ encoding = newEncoding; |
{ | ||
"name": "rw", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Wrappers of fs.{read,write}File that work for /dev/std{in,out}.", | ||
@@ -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
43641