Multili
Function to remove indentation in multi-lines template literals (string) based on the shortest indented line.
Install / Use
/learn @MoOx/MultiliREADME
multili
Function to remove indentation in multi-lines template literals (string) based on the shortest indented line.
Installation
$ npm install multili
Usage
import multili from "multili"
multili(
`
This is a
multi-lines
string
`
)
// Will produce
/*
This is a
multi-lines
string
*/
multili(`
This is a
multi-lines
string
`)
// Will produce
/*
This is a
multi-lines
string
*/
multili(`
This is a
multi-lines
string
`)
// Will produce
/*
This is a
multi-lines
string
*/
You can also pass an array of lines instead of a string; in this case, the return value will also be an array.
multili([
" This is a",
" milti-line",
" string",
])
// Will produce
/*
[
"This is a",
" milti-line",
" string",
]
*/
CONTRIBUTING
- ⇄ Pull/Merge requests and ★ Stars are always welcome.
- For bugs and feature requests, please create an issue.
- Pull/Merge requests must be accompanied by passing automated tests (
$ npm test).
CHANGELOG
LICENSE
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
