diff –git a/lib/util.js b/lib/util.js index a03e874..9074e8e 100644 — a/lib/util.js +++ b/lib/util.js @@ -19,430 +19,6 @@

// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

-var formatRegExp = /%[sdj%]/g; -exports.format = function(f) {

-

-}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If –no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) {

-

-

-

-}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) {

-}; - - -/**

-/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) {

-} -exports.inspect = inspect; - - -// en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = {

-}; - -// Don’t use ‘blue’ not visible on cmd.exe -inspect.styles = {

-}; - - -function stylizeWithColor(str, styleType) {

-

-} - - -function stylizeNoColor(str, styleType) {

-} - - -function arrayToHash(array) {

-

-

-} - - -function formatValue(ctx, value, recurseTimes) {

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-

-} - - -function formatPrimitive(ctx, value) {

-} - - -function formatError(value) {

-} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {

-} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {

-

-} - - -function reduceToSingleString(output, base, braces) {

-

-

-} - -

// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(ar) {

@@ -522,166 +98,10 @@ function isPrimitive(arg) {

exports.isPrimitive = isPrimitive;

function isBuffer(arg) {

+ return Buffer.isBuffer(arg);

}
exports.isBuffer = isBuffer;

function objectToString(o) {
  return Object.prototype.toString.call(o);

-} - - -function pad(n) {

-} - - -var months = [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’, ‘Jul’, ‘Aug’, ‘Sep’,

- -// 26 Feb 16:19:34 -function timestamp() {

-} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() {

-}; - - -/**

-exports.inherits = function(ctor, superCtor) {

-}; - -exports._extend = function(origin, add) {

-

-}; - -function hasOwnProperty(obj, prop) {

-} - - -// Deprecated old stuff. - -exports.p = exports.deprecate(function() {

-}, ‘util.p: Use console.error() instead’); - - -exports.exec = exports.deprecate(function() {

-}, ‘util.exec is now called `child_process.exec`.’); - - -exports.print = exports.deprecate(function() {

-}, ‘util.print: Use console.log instead’); - - -exports.puts = exports.deprecate(function() {

-}, ‘util.puts: Use console.log instead’); - - -exports.debug = exports.deprecate(function(x) {

-}, ‘util.debug: Use console.error instead’); - - -exports.error = exports.deprecate(function(x) {

-}, ‘util.error: Use console.error instead’); - - -exports.pump = exports.deprecate(function(readStream, writeStream, callback) {

-

-

-

-

-

-

-

-}, ‘util.pump(): Use readableStream.pipe() instead’); - - -var uv; -exports._errnoException = function(err, syscall) {

-}; +}