Browse Source

Remove require('buffer') in built-in libraries.

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
069d973d74
  1. 1
      lib/dgram.js
  2. 1
      lib/fs.js
  3. 1
      lib/http.js
  4. 1
      lib/net.js
  5. 2
      lib/readline.js
  6. 2
      lib/string_decoder.js

1
lib/dgram.js

@ -3,7 +3,6 @@ var fs = require("fs");
var events = require("events");
var dns = require('dns');
var Buffer = require('buffer').Buffer;
var IOWatcher = process.binding('io_watcher').IOWatcher;
var binding = process.binding('net');
var socket = binding.socket;

1
lib/fs.js

@ -1,6 +1,5 @@
var sys = require('sys');
var events = require('events');
var Buffer = require('buffer').Buffer;
var binding = process.binding('fs');
var constants = process.binding('constants');

1
lib/http.js

@ -10,7 +10,6 @@ if (debugLevel & 0x4) {
var net = require('net');
var events = require('events');
var Buffer = require('buffer').Buffer;
var FreeList = require('freelist').FreeList;
var HTTPParser = process.binding('http_parser').HTTPParser;

1
lib/net.js

@ -20,7 +20,6 @@ var binding = process.binding('net');
// represent buffer.used) that can be seeked around would be easier. I'm not
// yet convinced that every use-case can be fit into that abstraction, so
// waiting to implement it until I get more experience with this.
var Buffer = require('buffer').Buffer;
var FreeList = require('freelist').FreeList;
var IOWatcher = process.binding('io_watcher').IOWatcher;

2
lib/readline.js

@ -7,8 +7,6 @@
var kHistorySize = 30;
var kBufSize = 10*1024;
var Buffer = require('buffer').Buffer;
var sys = require('sys');
var inherits = require('sys').inherits;
var EventEmitter = require('events').EventEmitter;

2
lib/string_decoder.js

@ -1,5 +1,3 @@
var Buffer = require('buffer').Buffer;
var StringDecoder = exports.StringDecoder = function (encoding) {
this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/,'');
if (this.encoding === 'utf8') {

Loading…
Cancel
Save