3.0.0 • Published 10 months ago
auto-indent v3.0.0
Auto Indent
Auto Indent is a simple but powerful and minimalist solution to indenting in the console.
Contents
- Documentation 1.1 Small Example
- Prerequisites
- Versioning Policy 3.1 Policy 3.1.1 Summary
- Frequently Asked Questions 4.1 Does this project support TypeScript? 4.2 How can I find out about plans for new updates?
- Performance 5.1 Via console.time 5.2 Via jest
- PLANS (spoil yourself if you'd like)
Documentation
All documentation can be found on geodax.ca, it's just the domain I have.
Small Example
These are examples assuming you have configured auto-indent.
CommonJS
const indent = require("auto-indent");
const Settings = indent.loadSettings();
indent.stdout("Hello, World!", Settings); // Output: " Hello, World!"
ESM
import indent from "auto-indent";
const Settings = indent.loadSettings();
indent.stdout("Hello, World!", Settings); // Output: " Hello, World!"
Prerequisites
Auto Indent requires atleast node v6.0.0.
Versioning Policy
Policy
Auto Indent uses Semantic Versioning here is an explanation from the official developers of SemVer:
Summary
Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality in a backward compatible manner
- PATCH version when you make backward compatible bug fixes
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
Frequently Asked Questions
Does this project support TypeScript?
Technically. The type declaration is generated by ChatGPT and put under a simple test, so I can't guarantee anything.
How can I find out about plans for new updates?
Scroll down to the bottom. Do it! Just do it! Teehee! 🤓.
Performance
Via console.time
console.time method:
- stdout(2, "Hello, World!") in 5-8ms.
- ireturn(2, "Hello, World!") via console.log() was 6-9ms.
- loadSettings() via const Settings = loadSettings() was 0.5-1ms.
Via jest
jest method:
- stdout(2, "Hello, World!") in 3ms.
- ireturn(2, "Hello, World!") in 3ms.
- loadSettings() in 4ms.
PLANS (IF YOU DONT WANT TO SPOIL IT FOR YOURSELF DON'T READ THIS)
- A way to fill in the indent with a symbol. Example: "♥♥Hello, World!"
- Multiple lines indentation
- Dedent function
- Potentially bring CHANGELOG.md to geodax.ca