code-block-writer
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -12,2 +12,3 @@ declare module "code-block-writer" { | ||
newLine(): CodeBlockWriter; | ||
spaceIfLastNotSpace(): CodeBlockWriter; | ||
write(str: string): CodeBlockWriter; | ||
@@ -14,0 +15,0 @@ toString(): string; |
@@ -36,2 +36,8 @@ var CodeBlockWriter = (function () { | ||
}; | ||
CodeBlockWriter.prototype.spaceIfLastNotSpace = function () { | ||
if (this._text.length > 0 && this._text[this._text.length - 1] !== " ") { | ||
this.write(" "); | ||
} | ||
return this; | ||
}; | ||
CodeBlockWriter.prototype.write = function (str) { | ||
@@ -38,0 +44,0 @@ if (this._lastWasNewLine) { |
{ | ||
"name": "code-block-writer", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "A simple code writer that assists with formatting and visualizing blocks of code.", | ||
@@ -5,0 +5,0 @@ "main": "dist/code-block-writer.js", |
@@ -46,2 +46,10 @@ export default class CodeBlockWriter { | ||
spaceIfLastNotSpace() { | ||
if (this._text.length > 0 && this._text[this._text.length - 1] !== " ") { | ||
this.write(" "); | ||
} | ||
return this; | ||
} | ||
write(str: string) { | ||
@@ -48,0 +56,0 @@ if (this._lastWasNewLine) { |
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
10395
259