Comparing version 1.0.0 to 1.0.3
{ | ||
"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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9186
126
48
8
1