Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwdeane/deno-utils
Utility scripts written in Deno 🦕
https://github.com/jwdeane/deno-utils
Last synced: 30 days ago
JSON representation
Utility scripts written in Deno 🦕
- Host: GitHub
- URL: https://github.com/jwdeane/deno-utils
- Owner: jwdeane
- License: mit
- Created: 2022-08-12T00:56:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-05T07:11:57.000Z (over 2 years ago)
- Last Synced: 2024-06-12T13:07:09.687Z (7 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# deno
Utility scripts written in Deno 🦕
- [regex-replace.ts](./src/regex-replace.ts)
- function to test a RE2-like regex in JavaScript. Supply 3 arguments;
`source` string, `match` regex to match with, `replacement`
```
e.g. deno run src/regex-replace.ts source match replacement
❯ deno run src/regex-replace.ts '/images/nature/animals/tiger.png' '^/images/[^/]+/[^/]+/(.+)$' '/img/${1}'
/img/tiger.png
```
- [time-requests.ts](./src/time-requests.ts)
- fire `x` requests at a URL and log if breaching `y` response time (ms)
```
e.g. deno run --allow-net src/time-requests.ts https://example.com y x
❯ deno run --allow-net src/time-requests.ts https://example.com 250 10
```