find-dividers
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "find-dividers", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Find the number of dividers for a number.", | ||
"main": "index.js", | ||
"main": "./lib/index.js", | ||
"author": "Axel Rindle <axel.rindle@gmx.de>", | ||
"license": "MIT", | ||
"repository": "git@github.com:axelrindle/node-find-dividers.git" | ||
"repository": "git@github.com:axelrindle/node-find-dividers.git", | ||
"devDependencies": { | ||
"ava": "^1.4.1" | ||
}, | ||
"scripts": { | ||
"test": "ava" | ||
} | ||
} |
@@ -6,22 +6,15 @@ # node-find-dividers | ||
```javascript | ||
const dividers = require('find-dividers'); | ||
const findDividers = require("find-dividers"); | ||
let count = dividers(100); | ||
console.log(count); // => 9 | ||
let divs = findDividers(100); | ||
console.log(divs); // => [1, 2, 4, 5, 10, 20, 25, 50, 100] | ||
``` | ||
## API | ||
### `function dividers(n, excludeOne = true)` | ||
> Finds all dividers for a given number. | ||
Can be found in the [wiki](https://github.com/axelrindle/node-find-dividers/wiki). | ||
#### Parameters | ||
| Name | Type | Description | | ||
| ---- | ---- | ---- | | ||
| n | number | The number to find dividers for. | | ||
| excludeOne | boolean | Whether to exclude the number 1. | | ||
## Related | ||
- [node-find-dividers-cli](https://github.com/axelrindle/node-find-dividers-cli) | ||
#### Returns | ||
An array with all found dividers. | ||
## License | ||
[MIT](LICENSE) |
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
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
4988
10
104
1
20