Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

windmouse

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windmouse - npm Package Compare versions

Comparing version 1.0.0 to 1.0.3

lib/index.d.ts

29

package.json
{
"name": "windmouse",
"version": "1.0.0",
"description": "A JavaScript port of the WindMouse Java library created by BenLand100. This library returns data points for human-like mouse movement.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"version": "1.0.3",
"description": "A JavaScript library for generating human-like mouse movement data points.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib/**/*"
],
"scripts": {
"test": "jest --config jestconfig.json",
"build": "tsc",
"prepare": "npm run build"
"format": "prettier --write \"src/**/*.ts\"",
"lint": "tslint -p tsconfig.json",
"prepare": "npm run build",
"prepublishOnly": "npm test && npm run lint",
"preversion": "npm run lint",
"version": "npm run format && git add -A src",
"postversion": "git push && git push --tags"
},

@@ -30,4 +40,11 @@ "repository": {

"devDependencies": {
"@types/node": "^14.11.1"
"@types/jest": "^26.0.14",
"@types/node": "^14.11.1",
"jest": "^26.4.2",
"prettier": "^2.1.2",
"ts-jest": "^26.3.0",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0",
"typescript": "^4.0.3"
}
}
## WindMouse
WindMouse is a lightweight, and highly configurable, library for generating human-like mouse movement. The data points are then returned in a x,y point array for further usage.
### Installation
```
npm install windmouse
```
### Usage
```
const WindMouse = require("windmouse");
const fs = require("fs");
// Initialize WindMouse class
const windMouse = new WindMouse(Math.floor(Math.random() * 10));
// MouseSettings
let settings = {
startX: Math.ceil(Math.random() * 1920),
startY: Math.ceil(Math.random() * 1080),
endX: Math.ceil(Math.random() * 1920),
endY: Math.ceil(Math.random() * 1080),
gravity: Math.ceil(Math.random() * 10),
wind: Math.ceil(Math.random() * 10),
minWait: 2,
maxWait: Math.ceil(Math.random() * 5),
maxStep: Math.ceil(Math.random() * 3),
targetArea: Math.ceil(Math.random() * 10),
};
// Print points
async function logPoints() {
let points = await windMouse.GeneratePoints(settings);
console.log(points);
}
logPoints();
```
### Contributng
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
### License
https://opensource.org/licenses/MIT
### Credits
The original WindMouse library was created by https://github.com/BenLand100 for Java. This is a port of said library enabling for usage with JavaScript/TypeScript.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc