redent
Advanced tools
Comparing version 1.0.0 to 2.0.0
'use strict'; | ||
var stripIndent = require('strip-indent'); | ||
var indentString = require('indent-string'); | ||
const stripIndent = require('strip-indent'); | ||
const indentString = require('indent-string'); | ||
module.exports = function (str, count, indent) { | ||
return indentString(stripIndent(str), indent || ' ', count || 0); | ||
}; | ||
module.exports = (str, count, indent) => indentString(stripIndent(str), count || 0, indent); |
{ | ||
"name": "redent", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Strip redundant indentation and indent the string", | ||
@@ -13,3 +13,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": ">=4" | ||
}, | ||
@@ -37,4 +37,4 @@ "scripts": { | ||
"dependencies": { | ||
"indent-string": "^2.1.0", | ||
"strip-indent": "^1.0.1" | ||
"indent-string": "^3.0.0", | ||
"strip-indent": "^2.0.0" | ||
}, | ||
@@ -44,3 +44,6 @@ "devDependencies": { | ||
"xo": "*" | ||
}, | ||
"xo": { | ||
"esnext": true | ||
} | ||
} |
@@ -33,3 +33,3 @@ # redent [![Build Status](https://travis-ci.org/sindresorhus/redent.svg?branch=master)](https://travis-ci.org/sindresorhus/redent) | ||
Type: `number` | ||
Type: `number`<br> | ||
Default: `0` | ||
@@ -41,6 +41,6 @@ | ||
Type: `string` | ||
Type: `string`<br> | ||
Default: `' '` | ||
The string to use for the indent. | ||
String to use for the indent. | ||
@@ -50,2 +50,2 @@ | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2845
4
+ Addedindent-string@3.2.0(transitive)
+ Addedstrip-indent@2.0.0(transitive)
- Removedget-stdin@4.0.1(transitive)
- Removedindent-string@2.1.0(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedstrip-indent@1.0.1(transitive)
Updatedindent-string@^3.0.0
Updatedstrip-indent@^2.0.0