New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

console-dope

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-dope - npm Package Compare versions

Comparing version 0.3.3 to 0.3.4

73

lib/console-dope.js

@@ -11,3 +11,13 @@ "use strict";

var dope = module.exports = {};
exports.log = log;
exports.error = error;
exports.write = write;
exports.hideCursor = hideCursor;
exports.showCursor = showCursor;
exports.column = column;
exports.test = test;
exports.clearToScreenEnd = clearToScreenEnd;
exports.clearToScreenBegin = clearToScreenBegin;
exports.clearScreen = clearScreen;
exports.cursorPosition = cursorPosition;

@@ -122,7 +132,7 @@ /* Control Sequence Initiator */

function addSgrProperty(flag){
Object.defineProperty(dope, flag, {
Object.defineProperty(exports, flag, {
enumerable: true,
get: function(){
sgr.activeFlags.push(flag);
return dope;
return exports;
}

@@ -135,7 +145,7 @@ });

function addELProperty(flag){
Object.defineProperty(dope, flag, {
Object.defineProperty(exports, flag, {
enumerable: true,
get: function(){
EL.activeFlags.push(flag);
return dope;
return exports;
}

@@ -146,3 +156,3 @@ });

dope.log = function(){
function log(){
if (inBrowser){

@@ -166,5 +176,5 @@ arguments[0] = "%c" + arguments[0];

return this;
};
}
dope.error = function(){
function error(){
process.stderr.write(sgr.activeSeq());

@@ -176,5 +186,5 @@ process.stderr.write(EL.activeSeq());

return this;
};
}
dope.write = function(txt){
function write(txt){
out.write(sgr.activeSeq());

@@ -186,18 +196,37 @@ out.write(EL.activeSeq());

return this;
};
}
dope.hideCursor = function(){
out.write("\x1b[" + otherCodes.hide);
};
dope.showCursor = function(){
out.write("\x1b[" + otherCodes.show);
};
function hideCursor(){
out.write(csi + otherCodes.hide);
}
function showCursor(){
out.write(csi + otherCodes.show);
}
dope.column = function(col){
out.write(util.format("\x1b[%dG", col));
function column(col){
out.write(util.format("%s%dG", csi, col));
return this;
};
}
dope.test = function(){
function test(){
require("./examples/summary");
};
}
function clearToScreenEnd(){
out.write(util.format("%s0J", csi));
return exports;
}
function clearToScreenBegin(){
out.write(util.format("%s1J", csi));
return exports;
}
function clearScreen(){
out.write(util.format("%s2J", csi));
return exports;
}
function cursorPosition(row, column){
row = row || 1;
column = column || 1;
out.write(util.format("%s%s;%sH", csi, row, column));
return exports;
}
{
"name": "console-dope",
"version": "0.3.3",
"version": "0.3.4",
"description": "adds colouring and cursor control features to the console",

@@ -5,0 +5,0 @@ "main": "lib/console-dope.js",

[![view on npm](http://img.shields.io/npm/v/console-dope.svg)](https://www.npmjs.org/package/console-dope)
![npm module downloads per month](http://img.shields.io/npm/dm/console-dope.svg)
[![Dependency Status](https://david-dm.org/75lb/console-dope.png)](https://david-dm.org/75lb/console-dope)
[![Dependency Status](https://david-dm.org/75lb/console-dope.svg)](https://david-dm.org/75lb/console-dope)

@@ -5,0 +5,0 @@ **work in progress**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc