# Faithful implementation of string-dedent

**URL:** <https://es.discourse.group/t/faithful-implementation-of-string-dedent/1417>\
**Category:** 🦋 Proposals\
**Created:** [August 4, 2022, 4:21am UTC](https://es.discourse.group/t/faithful-implementation-of-string-dedent/1417 "2022-08-04T04:21:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh-Cena](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/josh-cena/32/1408_2.png) [@Josh-Cena](https://es.discourse.group/u/Josh-Cena)\
**Post date:** [August 4, 2022, 4:21am UTC](https://es.discourse.group/t/faithful-implementation-of-string-dedent/1417/1 "2022-08-04T04:21:29Z")

</div>

#### Proposal: [GitHub - tc39/proposal-string-dedent: TC39 Proposal to remove common leading indentation from multiline template strings](https://github.com/tc39/proposal-string-dedent)

The string-dedent spec is the longest AO I've ever seen for a single API. I wrote a faithful TS implementation which is a 1-1 translation from the spec text:

> <https://gist.github.com/Josh-Cena/cc67a9e9f386bf4f0b790e789f9d3944>

Hope that could be useful for testing

---

<div class="post-metadata">

**Author:** ![ljharb](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/ljharb/32/8_2.png) [@ljharb](https://es.discourse.group/u/ljharb)\
**Post date:** [August 4, 2022, 4:48am UTC](https://es.discourse.group/t/faithful-implementation-of-string-dedent/1417/2 "2022-08-04T04:48:41Z")

</div>

Sounds like a great PR to [https://npmjs.com/es-abstract](https://npmjs.com/es-abstract) once it’s stage 4 :-D
