Socket
Socket
Sign inDemoInstall

charm

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

charm - npm Package Compare versions

Comparing version 0.1.2 to 0.2.0

37

index.js

@@ -218,2 +218,39 @@ var tty = require('tty');

Charm.prototype.delete = function (s, n) {
n = n || 1
if (s === 'line') {
this.write(encode('[' + n + 'M'));
}
else if (s === 'char') {
this.write(encode('[' + n + 'M'));
}
else {
this.emit('error', new Error('Unknown delete type: ' + s));
}
return this;
};
Charm.prototype.insert = function (mode, n) {
n = n || 1
if(mode === true) {
this.write(encode('[4h'));
}
else if (mode === false) {
this.write(encode('[l'));
}
else if (mode === 'line') {
this.write(encode('[' + n + 'L'));
}
else if (mode === 'char') {
this.write(encode('[' + n + '@'));
}
else {
this.emit('error', new Error('Unknown delete type: ' + s));
}
return this;
};
Charm.prototype.display = function (attr) {

@@ -220,0 +257,0 @@ var c = {

2

package.json
{
"name" : "charm",
"version" : "0.1.2",
"version" : "0.2.0",
"description" : "ansi control sequences for terminal cursor hopping and colors",

@@ -5,0 +5,0 @@ "main" : "index.js",

Sorry, the diff of this file is not supported yet

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