https://github.com/caiogondim/strip-margin.js
https://github.com/caiogondim/strip-margin.js
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/caiogondim/strip-margin.js
- Owner: caiogondim
- Created: 2019-05-31T20:24:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-10T13:21:48.000Z (almost 6 years ago)
- Last Synced: 2025-03-09T13:34:57.922Z (3 months ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# strip-margin
[stripMargin from Scala](https://www.oreilly.com/library/view/scala-cookbook/9781449340292/ch01s03.html) to JS.
## Installation
```
npm install @caiogondim/strip-margin -S
```### Usage
```js
import stripMargin from 'strip-margin'const str = stripMargin(`
|Four score and
|seven years ago
`)
console.log(str)
// ->
// Four score and
// seven years ago
```---
[caiogondim.com](https://caiogondim.com) ·
GitHub [@caiogondim](https://github.com/caiogondim) ·
Twitter [@caio_gondim](https://twitter.com/caio_gondim)