Comparing version 1.0.1 to 1.0.2
@@ -142,3 +142,3 @@ 'use strict'; | ||
return whitespaces(LINE_NO_SPAN_LENGTH + caret - 1, '-') | ||
+ '^ ' | ||
+ '^ ' | ||
+ 'column: ' + column | ||
@@ -145,0 +145,0 @@ } |
{ | ||
"name": "print-code", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Print visualized slice of code from its content, line and column for CLI", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,9 +27,20 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-print-code.svg?branch=master)](https://travis-ci.org/kaelzhang/node-print-code) | ||
code(content) | ||
.slice(10, 14) | ||
.max_columns(78) | ||
.highlight(12) | ||
.arrow_mark(12, column) | ||
.highlight(4) | ||
.slice(1, 6) | ||
.max_columns(68) | ||
.arrow_mark(4, 10) | ||
.print() | ||
``` | ||
And then the output might be (Line No 4 is red): | ||
``` | ||
1| 'use strict'; | ||
2| | ||
3| module.exports = code | ||
4| code.Code = Code | ||
----------------^ column: 10 | ||
5| | ||
``` | ||
#### .slice([from] [, to]) | ||
@@ -36,0 +47,0 @@ |
@@ -11,6 +11,6 @@ 'use strict'; | ||
code(content) | ||
.highlight(10, 11) | ||
.slice(1, 12) | ||
.highlight(4) | ||
.slice(1, 6) | ||
.max_columns(68) | ||
.arrow_mark(11, 70) | ||
.arrow_mark(4, 10) | ||
.print() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9771
94
0