strip-indent
Advanced tools
Comparing version 3.0.0 to 4.0.0
@@ -8,3 +8,3 @@ /** | ||
``` | ||
import stripIndent = require('strip-indent'); | ||
import stripIndent from 'strip-indent'; | ||
@@ -20,4 +20,2 @@ const string = '\tunicorn\n\t\tcake'; | ||
*/ | ||
declare function stripIndent(string: string): string; | ||
export = stripIndent; | ||
export default function stripIndent(string: string): string; |
@@ -1,5 +0,4 @@ | ||
'use strict'; | ||
const minIndent = require('min-indent'); | ||
import minIndent from 'min-indent'; | ||
module.exports = string => { | ||
export default function stripIndent(string) { | ||
const indent = minIndent(string); | ||
@@ -14,2 +13,2 @@ | ||
return string.replace(regex, ''); | ||
}; | ||
} |
{ | ||
"name": "strip-indent", | ||
"version": "3.0.0", | ||
"version": "4.0.0", | ||
"description": "Strip leading whitespace from each line in a string", | ||
"license": "MIT", | ||
"repository": "sindresorhus/strip-indent", | ||
"funding": "https://github.com/sponsors/sindresorhus", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
"url": "https://sindresorhus.com" | ||
}, | ||
"type": "module", | ||
"exports": "./index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=12" | ||
}, | ||
@@ -35,9 +38,9 @@ "scripts": { | ||
"dependencies": { | ||
"min-indent": "^1.0.0" | ||
"min-indent": "^1.0.1" | ||
}, | ||
"devDependencies": { | ||
"ava": "^1.4.1", | ||
"tsd": "^0.7.2", | ||
"xo": "^0.24.0" | ||
"ava": "^3.15.0", | ||
"tsd": "^0.14.0", | ||
"xo": "^0.39.1" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# strip-indent [![Build Status](https://travis-ci.org/sindresorhus/strip-indent.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-indent) | ||
# strip-indent | ||
@@ -9,3 +9,2 @@ > Strip leading whitespace from each line in a string | ||
## Install | ||
@@ -17,7 +16,6 @@ | ||
## Usage | ||
```js | ||
const stripIndent = require('strip-indent'); | ||
import stripIndent from 'strip-indent'; | ||
@@ -37,3 +35,2 @@ const string = '\tunicorn\n\t\tcake'; | ||
## Related | ||
@@ -44,5 +41,12 @@ | ||
--- | ||
## License | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-strip-indent?utm_source=npm-strip-indent&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3644
49
Yes
24
Updatedmin-indent@^1.0.1