background preloader


Facebook Twitter

Prettyjson - Node.js package for formatting JSON data in a coloured YAML-style, perfect for CLI output - UX. Package for formatting JSON data in a coloured YAML-style, perfect for CLI output.

prettyjson - Node.js package for formatting JSON data in a coloured YAML-style, perfect for CLI output - UX

How to install Just install it via NPM: Using it (from the CLI) This package installs a command line interface to render JSON data in a more convenient way. You can use the CLI in three different ways: Decode a JSON file: If you want to see the contents of a JSON file, just pass it as the first argument to the CLI: $ prettyjson package.json Decode the stdin: You can also pipe the result of a command (for example an HTTP request) to the CLI to see the JSON result in a clearer way: $ curl | prettyjson Decode random strings: if you call the CLI with no arguments, you'll get a prompt where you can past JSON strings and they'll be automatically displayed in a clearer way: If you install the package globally (with npm install -g prettyjson), the CLI will be installed automatically in your PATH thanks to npm. Command line options It's possible to customize the output through some command line options: And will output: Kkaefer/node-cpp-modules - UX.

Nodeca/mincer - UX. UX. Nodetime - Performance Profiler for Node.js - UX. 3on/scrap.js. Jog by visionmedia. JSON logging & reporting inspired by Loggly for node.js.

Jog by visionmedia

Installation $ npm install jog Features namespace supportrich json documentslog levelsfile storeredis storedocument streamingtail -f like streamingCLI to tail and map / reduce logs log.write(level, msg[, obj]) Write to the logs: log.write(level, msg[, obj])log.debug(msg[, obj])[, obj])log.warn(msg[, obj])log.error(msg[, obj]) log.ns(obj) Namespace with the given obj, returning a new Jog instance inheriting previous properties. Return an EventEmitter emitting "data" and "end" events. end when false streaming will not endinterval the interval at which to poll (store-specific) log.clear(callback) Clear the logs and invoke the callback. Example Log random data using the FileStore and tail the file for changes (typically in different processes). Yields: jog(1) Examples View all logs from tobi. Filter video compilation durations from "tobi" only: The --map flag can be used several times: Stores.

LearnBoost/console-trace - UX. Baryon/tracer - UX. Table of Contents - Mixu's Node book - Mixu's Node book - UX. Fent/node-kat - UX. Benvie/view-buffer - UX. Benvie/reified - UX. Baudehlo's gist: 1996244 — Gist - UX. Var util = require('util'); var fs = require('fs'); var Stream = require('stream').Stream; var ArrayStream = function () {; this.data_lines = []; this.data_bytes = 0; this.header_pos = 0; this.data_marker = 0; this.max_mem_bytes = 5; this.fs_wstream = null; this.fd_wstream = null; this.switching = false; this.paused = false; this.readable = true; this.fix_line = function (line) { return line }; util.inherits(ArrayStream, Stream); // The only thing we get is EventEmitter stuff, and pipe(), so the rest needs implemented: ArrayStream.prototype.add_data = function (line) { var self = this; if (this.switching) { return setTimeout(100, function () { self.add_data(line);

baudehlo's gist: 1996244 — Gist - UX

Polotek/procstreams - UX. Xk/node-threads-a-gogo - UX. Benvie/Node.js-Ultra-REPL - UX. Veged/coa - UX.


Vdemedes/magician. Bus. Email. Pkrumins/node-lazy. Bramstein/bit-array. Fent/clusterhub. Substack/bouncy. Kumatch/node-satisfic.