Socket
Socket
Sign inDemoInstall

code-block-writer

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-block-writer - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

1

code-block-writer.d.ts

@@ -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) {

2

package.json
{
"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) {

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