Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codemaker

Package Overview
Dependencies
Maintainers
5
Versions
195
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codemaker - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

9

lib/codemaker.d.ts

@@ -13,2 +13,3 @@ /**

private readonly excludes;
get currentIndentLength(): number;
/**

@@ -21,3 +22,3 @@ * Formats an block open statement.

*/
closeBlockFormatter: (s?: string) => string;
closeBlockFormatter: (s?: string) => string | false;
/**

@@ -56,3 +57,3 @@ * Saves all the files created in this code maker.

*/
unindent(textAfter?: string): void;
unindent(textAfter?: string | false): void;
/**

@@ -66,4 +67,6 @@ * Increases the indentation level by `indentation` spaces for the next line.

* @param textAfter Text to emit in the line after indentation was decreased.
* If `false` no line will be emitted at all, but the indent
* counter will be decremented.
*/
close(textAfter?: string): void;
close(textAfter?: string | false): void;
/**

@@ -70,0 +73,0 @@ * Opens a code block. The formatting of the block is determined by `openBlockFormatter`.

@@ -28,2 +28,5 @@ "use strict";

}
get currentIndentLength() {
return this.currIndent * this.indentation;
}
/**

@@ -106,6 +109,10 @@ * Saves all the files created in this code maker.

* @param textAfter Text to emit in the line after indentation was decreased.
* If `false` no line will be emitted at all, but the indent
* counter will be decremented.
*/
close(textAfter) {
this.currIndent--;
this.line(textAfter);
if (textAfter !== false) {
this.line(textAfter);
}
}

@@ -153,12 +160,10 @@ /**

makeIndent() {
let spaces = '';
for (let i = 0; i < this.currIndent; ++i) {
for (let j = 0; j < this.indentation; ++j) {
spaces += ' ';
}
const length = this.currentIndentLength;
if (length <= 0) {
return '';
}
return spaces;
return ' '.repeat(length);
}
}
exports.CodeMaker = CodeMaker;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZW1ha2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiY29kZW1ha2VyLnRzIl0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XG4gIHB1YmxpYyB0b0NhbWVsQ2FzZSguLi5hcmdzOiBzdHJpbmdbXSkge1xuICAgIHJldHVybiBjYXNldXRpbHMudG9DYW1lbENhc2UoLi4uYXJncyk7XG4gIH1cblxuICAvKipcbiAgICogQ29udmVydHNTdHJpbmdUb1Bhc2NhbENhc2VcbiAgICovXG4gIHB1YmxpYyB0b1Bhc2NhbENhc2UoLi4uYXJnczogc3RyaW5nW10pIHtcbiAgICByZXR1cm4gY2FzZXV0aWxzLnRvUGFzY2FsQ2FzZSguLi5hcmdzKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBjb252ZXJ0X3N0cmluZ190b19zbmFrZV9jYXNlXG4gICAqIEBwYXJhbSBzZXAgU2VwYXJhdG9yIChkZWZhdWx0cyB0byAnXycpXG4gICAqL1xuICBwdWJsaWMgdG9TbmFrZUNhc2Uoczogc3RyaW5nLCBzZXAgPSAnXycpIHtcbiAgICByZXR1cm4gY2FzZXV0aWxzLnRvU25ha2VDYXNlKHMsIHNlcCk7XG4gIH1cblxuICBwcml2YXRlIG1ha2VJbmRlbnQoKTogc3RyaW5nIHtcbiAgICBjb25zdCBsZW5ndGggPSB0aGlzLmN1cnJlbnRJbmRlbnRMZW5ndGg7XG4gICAgaWYgKGxlbmd0aCA8PSAwKSB7XG4gICAgICByZXR1cm4gJyc7XG4gICAgfVxuICAgIHJldHVybiAnICcucmVwZWF0KGxlbmd0aCk7XG4gIH1cbn1cbiJdfQ==
{
"name": "codemaker",
"version": "1.10.0",
"version": "1.11.0",
"description": "A tiny utility for generating source code",

@@ -40,10 +40,8 @@ "license": "Apache-2.0",

"@types/fs-extra": "^8.1.1",
"@types/jest": "^26.0.8",
"@types/jest": "^26.0.10",
"@types/node": "^10.17.28",
"eslint": "^7.6.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.2.2",
"eslint": "^7.7.0",
"jest": "^26.4.0",
"prettier": "^2.0.5",
"typescript": "~3.9.6"
"typescript": "~3.9.7"
},

@@ -50,0 +48,0 @@ "jest": {

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