Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Remove util module dependency #2

Merged
merged 1 commit into from

2 participants

@CoryG89

Instead the Node.JS process object can be utilized to gain access to
stdout, it works just as well.

@CoryG89 CoryG89 Remove dependency of util
Instead the Node.JS process object can be utilized to gain access to
stdout, it works just as well.
4bec6d4
@SchizoDuckie SchizoDuckie merged commit 4e68c4c into SchizoDuckie:master
@SchizoDuckie

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 31, 2012
  1. @CoryG89

    Remove dependency of util

    CoryG89 authored
    Instead the Node.JS process object can be utilized to gain access to
    stdout, it works just as well.
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 11 deletions.
  1. +1 −1  README.md
  2. +7 −10 node-cli.js
View
2  README.md
@@ -3,7 +3,7 @@ Node.CLI
By SchizoDuckie
-Updated By xkxx
+Updated By Cory Gross, xkxx
Super simple CLI cursor position control to spice up your script's functionality in terminal/console windows
Updated for 0.4.*
View
17 node-cli.js
@@ -1,20 +1,17 @@
/**
* Node.CLI
- * By SchizoDuckie
- * Updated By xkxx
+ * Original Author: SchizoDuckie
+ * Updated by: Cory Gross, xkxx
*
- * Super simple CLI cursor position control to spice up your script's functionality in terminal/console windows
- * Updated for 0.4.*
- * Requires util only
- * v2.0
+ * Super simple CLI for enhanced control over cursor position and color customization
+ * to spice up your script's functionality and appearance in terminal/console windows.
+ * Requires no dependencies. Instead utilizes Node.JS 'process' object to access stdout.
*
* ANSI escape codes are used. For details see: http://en.wikipedia.org/wiki/ANSI_escape_code
*
* Free to use and modify, enjoy!
*/
-var util = require("util");
-
function NodeCli () {
this.bold = true;
@@ -106,13 +103,13 @@ function NodeCli () {
//Output string @ current x/y
this.write = function(string) {
- util.print(string);
+ process.stdout.print(string);
return(this);
};
//Output string at new line
this.print = function(string) {
- util.puts(string);
+ process.stdout.puts(string);
return(this);
};
Something went wrong with that request. Please try again.