https://github.com/exoticknight/url-monkey
let monkey types url for you
https://github.com/exoticknight/url-monkey
Last synced: 3 months ago
JSON representation
let monkey types url for you
- Host: GitHub
- URL: https://github.com/exoticknight/url-monkey
- Owner: exoticknight
- License: mit
- Created: 2018-12-26T12:16:48.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-26T12:21:57.000Z (over 6 years ago)
- Last Synced: 2025-02-24T21:52:33.967Z (3 months ago)
- Language: TypeScript
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# url-monkey
let monkey types url for you
random string provided by [randexp](https://www.npmjs.com/package/randexp)
## Install
```bash
npm i -S url-monkey
```## Usage
```javascript
import URLMonkey from 'url-monkey'const monkey = new URLMonkey('www.google.com', {
path: /^\/greeting\/([^\/]+?)(?:\/)?$/i,
// protocol: 'https', // can be regex, too
// port: 80, // can be regex, too
})Array(5).fill(0).forEach(() => console.log(monkey.type()))
// www.google.com/GREeTinG//
// www.google.com/gReetinG/
// www.google.com/GreEtiNg/OzpmeK(vLGPHcdYPlgAE!d(NybsGTl++hBNzEHbl(,+quITlnOXHieEan$prEcY!ywjHRSwl/
// www.google.com/gReEtING/Uno&h@wSAT@O,cAu~HyL:+arerICgnaD~RydS/
// www.google.com/gREETiNg//
```## License
MIT