| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9aa6a43 commit 5f6579d
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -194,7 +194,6 @@ Buffer.isEncoding = function(encoding) { | |||
| 194 | 194 | case 'ucs-2': | |
| 195 | 195 | case 'utf16le': | |
| 196 | 196 | case 'utf-16le': | |
| 197 | - case 'raw': | ||
| 198 | 197 | return true; | |
| 199 | 198 | ||
| 200 | 199 | default: | |
@@ -260,9 +259,6 @@ function byteLength(string, encoding) { | |||
| 260 | 259 | switch (encoding) { | |
| 261 | 260 | case 'ascii': | |
| 262 | 261 | case 'binary': | |
| 263 | - // Deprecated | ||
| 264 | - case 'raw': | ||
| 265 | - case 'raws': | ||
| 266 | 262 | return len; | |
| 267 | 263 | ||
| 268 | 264 | case 'utf8': | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1217,18 +1217,6 @@ enum encoding ParseEncoding(const char* encoding, | |||
| 1217 | 1217 | return BUFFER; | |
| 1218 | 1218 | } else if (strcasecmp(encoding, "hex") == 0) { | |
| 1219 | 1219 | return HEX; | |
| 1220 | - } else if (strcasecmp(encoding, "raw") == 0) { | ||
| 1221 | - if (!no_deprecation) { | ||
| 1222 | - fprintf(stderr, "'raw' (array of integers) has been removed. " | ||
| 1223 | - "Use 'binary'.\n"); | ||
| 1224 | - } | ||
| 1225 | - return BINARY; | ||
| 1226 | - } else if (strcasecmp(encoding, "raws") == 0) { | ||
| 1227 | - if (!no_deprecation) { | ||
| 1228 | - fprintf(stderr, "'raws' encoding has been renamed to 'binary'. " | ||
| 1229 | - "Please update your code.\n"); | ||
| 1230 | - } | ||
| 1231 | - return BINARY; | ||
| 1232 | 1220 | } else { | |
| 1233 | 1221 | return default_encoding; | |
| 1234 | 1222 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,9 +5,9 @@ var assert = require('assert'); | |||
| 5 | 5 | var Buffer = require('buffer').Buffer; | |
| 6 | 6 | ||
| 7 | 7 | // coerce values to string | |
| 8 | - assert.equal(Buffer.byteLength(32, 'raw'), 2); | ||
| 8 | + assert.equal(Buffer.byteLength(32, 'binary'), 2); | ||
| 9 | 9 | assert.equal(Buffer.byteLength(NaN, 'utf8'), 3); | |
| 10 | - assert.equal(Buffer.byteLength({}, 'raws'), 15); | ||
| 10 | + assert.equal(Buffer.byteLength({}, 'binary'), 15); | ||
| 11 | 11 | assert.equal(Buffer.byteLength(), 9); | |
| 12 | 12 | ||
| 13 | 13 | // special case: zero length string | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ var fs = require('fs'); | |||
| 6 | 6 | var got_error = false; | |
| 7 | 7 | ||
| 8 | 8 | var filename = path.join(common.fixturesDir, 'does_not_exist.txt'); | |
| 9 | - fs.readFile(filename, 'raw', function(err, content) { | ||
| 9 | + fs.readFile(filename, 'binary', function(err, content) { | ||
| 10 | 10 | if (err) { | |
| 11 | 11 | got_error = true; | |
| 12 | 12 | } else { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments