All Projects → tamino-martinius → node-ts-dedent

tamino-martinius / node-ts-dedent

Licence: MIT license
TypeScript package which smartly trims and strips indentation from multi-line strings

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to node-ts-dedent

warframe-worldstate-parser
📗 An Open parser for Warframe's Worldstate in Javascript
Stars: ✭ 50 (-57.98%)
Mutual labels:  node-js, node-module
Node Loadbalance
A collection of distilled load balancing engines
Stars: ✭ 79 (-33.61%)
Mutual labels:  node-js, node-module
Practicalnode
Practical Node.js, 1st and 2nd Editions [Apress] 📓
Stars: ✭ 3,694 (+3004.2%)
Mutual labels:  node-js, node-module
node-typescript-starter
REST API using Node with typescript, KOA framework. TypeORM for SQL. Middlewares JWT (auth), CORS, Winston Logger, Error, Response
Stars: ✭ 19 (-84.03%)
Mutual labels:  node-js, node-module
Flake Idgen
Flake ID generator yields k-ordered, conflict-free ids in a distributed environment in Node.js
Stars: ✭ 196 (+64.71%)
Mutual labels:  node-js, node-module
node-advanced
Node Advanced Courseware
Stars: ✭ 80 (-32.77%)
Mutual labels:  node-js, node-module
Rando.js
The world's easiest, most powerful random function.
Stars: ✭ 659 (+453.78%)
Mutual labels:  node-js, node-module
node-screenlogic
Pentair ScreenLogic Javascript library using Node.JS
Stars: ✭ 38 (-68.07%)
Mutual labels:  node-js, node-module
Obs Studio Node
libOBS (OBS Studio) for Node.Js, Electron and similar tools
Stars: ✭ 193 (+62.18%)
Mutual labels:  node-js, node-module
Manual Node
📗 📒 (PT-BR Tradução) 2020 Edition - Tradução por Christy e Vinicius Dias (https://github.com/ViniciusmDias).
Stars: ✭ 134 (+12.61%)
Mutual labels:  node-js, node-module
vayder
Easy and concise validations for Express routes
Stars: ✭ 26 (-78.15%)
Mutual labels:  node-js, node-module
teaching-nodejs-expressjs-framework-spring-2019-2020
Complete Node-Express Application
Stars: ✭ 16 (-86.55%)
Mutual labels:  node-js, node-module
Solidarity
Solidarity is an environment checker for project dependencies across multiple machines.
Stars: ✭ 540 (+353.78%)
Mutual labels:  node-js, node-module
Async Ray
Provide async/await callbacks for every, find, findIndex, filter, forEach, map, reduce, reduceRight and some methods in Array.
Stars: ✭ 102 (-14.29%)
Mutual labels:  node-js, node-module
ifto
A simple debugging module for AWS Lambda (λ) timeout
Stars: ✭ 72 (-39.5%)
Mutual labels:  node-js, node-module
biguint-format
Node.js module to format big uint numbers from a byte array or a Buffer
Stars: ✭ 16 (-86.55%)
Mutual labels:  node-js, node-module
node-cli-boilerplate
🪓 Create node cli with this user friendly boilerplate
Stars: ✭ 17 (-85.71%)
Mutual labels:  node-module
mern-ecommerce
MERN Stack ecommerce site
Stars: ✭ 122 (+2.52%)
Mutual labels:  node-js
Shock
Shock - 내가 골라 외우는 영단어
Stars: ✭ 20 (-83.19%)
Mutual labels:  node-js
mongo-uri-builder
A node.js module to easily create mongodb connection strings using configuration objects
Stars: ✭ 29 (-75.63%)
Mutual labels:  node-js

TypeScript Dedent

codecov

TypeScript package which smartly trims and strips indentation from multi-line strings.

Usage Examples

import { dedent } from 'ts-dedent';

console.log(dedent`A string that gets so long you need to break it over
                    multiple lines. Luckily dedent is here to keep it
                    readable without lots of spaces ending up in the string
                    itself.`);

console.log(dedent`
  A string that gets so long you need to break it over
  multiple lines. Luckily dedent is here to keep it
  readable without lots of spaces ending up in the string
  itself.
`);
A string that gets so long you need to break it over
multiple lines. Luckily dedent is here to keep it
readable without lots of spaces ending up in the string
itself.

console.log(dedent`
  Leading and trailing lines will be trimmed, so you can write something like
  this and have it work as you expect:

    * how convenient it is
    * that I can use an indented list
        - and still have it do the right thing

  That's all.
`);
Leading and trailing lines will be trimmed, so you can write something like
this and have it work as you expect:

  * how convenient it is
  * that I can use an indented list
    - and still have it do the right thing

That's all.

console.log(dedent`
  Also works fine

  ${1}. With any kind of
  ${2}. Placeholders
`);
Also works fine

1. With any kind of
2. Placeholders

console.log(dedent(`
  Wait! I lied. Dedent can also be used as a function.
`);
Wait! I lied. Dedent can also be used as a function.

License

MIT

Based on

Changelog

See history for more details.

  • 2.2.1 2021-08-01 Update build dependencies and fixed typos in readme
  • 2.2.0 2021-08-01 Add indentation to values with multiline strings & added ESM module
  • 2.1.1 2021-03-31 Update build dependencies
  • 2.1.0 2021-03-24 Bugfixes
  • 2.0.0 2020-09-28 Bugfixes
  • 1.2.0 2020-09-28 Update build dependencies and a couple of minor improvments
  • 1.1.0 2019-07-26 Update build dependencies and fixed links in readme
  • 1.0.0 2018-06-14 Initial release
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].