Download next.js/scripts/rm.mjs from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 365 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/scripts/rm.mjs
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/scripts/rm.mjs
-
curl -L -o rm.mjs https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/scripts/rm.mjs
365 Bytes
| // @ts-check | |
| import { rm } from 'fs/promises' | |
| import { join } from 'path' | |
| const args = process.argv.slice(2) | |
| if (args.length === 0) { | |
| throw new Error('rm.mjs: requires a least one parameter') | |
| } | |
| for (const arg of args) { | |
| const path = join(process.cwd(), arg) | |
| console.log(`rm.mjs: deleting path "${path}"`) | |
| await rm(path, { recursive: true, force: true }) | |
| } | |