Socket
Socket
Sign inDemoInstall

find-dividers

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

.github/main.workflow

12

package.json
{
"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)
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc