Socket
Socket
Sign inDemoInstall

typo

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.12 to 0.1.13

11

lib/typo.js

@@ -35,8 +35,9 @@ 'use strict';

this.clean = options.clean;
this._helpers = new Typo.Helpers();
this.colors = 'colors' in options ? options.colors : true;
this.EOS = options.EOS || '\n';
var output = options.output;
output && this.pipe(output);
output && this.pipe(output);
this._helpers = new Typo.Helpers();
};

@@ -60,3 +61,3 @@

self.write(value);
self.write(value + self.EOS);

@@ -136,3 +137,3 @@ callback && callback(null, value);

Typo.prototype._clean = function (subject) {
return this.clean ? subject && subject.replace(REGEX_CGR, '') : subject;
return !this.colors ? subject && subject.replace(REGEX_CGR, '') : subject;
};

@@ -139,0 +140,0 @@

{
"name": "typo",
"version": "0.1.12",
"version": "0.1.13",
"description": "Typo is a scalable template engine designed for cli, which help to format your console output! Typo supports full 256-color ANSI background and foreground, underline, italic, etc.",

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

@@ -162,7 +162,7 @@ # Typo

##### options.clean `Boolean`
##### options.colors `Boolean`
Optional, default to `false`
Optional, default to `true`
If true, typo will clean all styles and output pure text, which is really helpfull if you use typo in CI.
If true, typo will clean all styles (colors, bold, etc) and output the pure text, which is really helpfull if you use typo in CI.

@@ -177,3 +177,9 @@ ##### options.output `Stream.Writeable`

##### options.EOS `String`
Optional, default to `'\n'`
The End-of-Sentence. By default, it's a carriage return.
## Instance Methods

@@ -180,0 +186,0 @@

'use strict';
var typo = require('typo')({
clean: ~ process.argv.indexOf('--clean'),
colors: ! ~ process.argv.indexOf('--clean'),
output: process.stdout

@@ -6,0 +6,0 @@ });

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc