Update ava to 4.3.3

The [release notes](https://github.com/avajs/ava/releases/tag/v4.3.3)
mention compatibility with Node 18.8.
This commit is contained in:
Henry Mercer 2022-09-02 18:02:07 +01:00
parent 21530f507f
commit bea5e4b220
160 changed files with 2647 additions and 2263 deletions

2
node_modules/convert-to-spaces/dist/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,2 @@
declare const convertToSpaces: (input: string, spaces?: number) => string;
export default convertToSpaces;

4
node_modules/convert-to-spaces/dist/index.js generated vendored Normal file
View file

@ -0,0 +1,4 @@
const convertToSpaces = (input, spaces = 2) => {
return input.replace(/^\t+/gm, $1 => ' '.repeat($1.length * spaces));
};
export default convertToSpaces;

View file

@ -1,5 +0,0 @@
'use strict';
module.exports = (str, spaces) => {
return str.replace(/^\t+/gm, $1 => ' '.repeat($1.length * (spaces || 2)));
};

View file

@ -1,25 +1,40 @@
{
"name": "convert-to-spaces",
"version": "1.0.2",
"version": "2.0.1",
"description": "Convert tabs to spaces in a string",
"license": "MIT",
"repository": "vadimdemedes/convert-to-spaces",
"author": "Vadim Demedes <vdemedes@gmail.com>",
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"prepare": "npm run build",
"pretest": "npm run build",
"test": "xo && ava"
},
"type": "module",
"exports": "./dist/index.js",
"types": "./dist/index.d.ts",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"files": [
"dist"
],
"keywords": [
"tabs",
"spaces"
],
"engines": {
"node": ">= 4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"devDependencies": {
"ava": "^0.18.2",
"xo": "^0.17.1"
}
"@sindresorhus/tsconfig": "^2.0.0",
"@vdemedes/prettier-config": "^2.0.1",
"ava": "^4.0.1",
"prettier": "^2.5.1",
"typescript": "^4.5.5",
"xo": "^0.47.0"
},
"xo": {
"prettier": true
},
"prettier": "@vdemedes/prettier-config"
}

View file

@ -1,34 +1,31 @@
# convert-to-spaces [![Build Status](https://travis-ci.org/vadimdemedes/convert-to-spaces.svg?branch=master)](https://travis-ci.org/vadimdemedes/convert-to-spaces)
# convert-to-spaces [![Build Status](https://github.com/vadimdemedes/convert-to-spaces/workflows/test/badge.svg)](https://github.com/vadimdemedes/convert-to-spaces/actions)
> Convert tabs to spaces in a string
## Install
```
$ npm install --save convert-to-spaces
```
## Usage
```js
const convertToSpaces = require('convert-to-spaces');
import convertToSpaces from 'convert-to-spaces';
convertToSpaces('\t\thello!');
//=> ' hello!'
```
## API
### convertToSpaces(str, [spaces])
### convertToSpaces(input, [spaces])
#### str
#### input
Type: `string`
Source string.
String to convert.
#### spaces
@ -37,12 +34,6 @@ Default: `2`
Number of spaces instead of each tab.
## Related
- [convert-to-tabs](https://github.com/vadimdemedes/convert-to-tabs) - Convert spaces to tabs.
## License
MIT © [Vadim Demedes](https://vadimdemedes.com)