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.1
0.5.0
0.4.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
CLI tool for Size Limit
github.com/ai/size-limit
ai/size-limit
size-limit
/
rm.js
14 lines
(12 loc)
•
299 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import
{ existsSync }
from
'node:fs'
import
fs
from
'node:fs/promises'
export
async
function
rm
(
dir
) {
if
(!fs.
rm
) {
/* c8 ignore next 3 */
if
(
existsSync
(dir)) {
await
fs.
rmdir
(dir, {
recursive
:
true
}) } }
else
{
await
fs.
rm
(dir, {
force
:
true
,
recursive
:
true
}) } }