https://github.com/cromarmot/isnumberone
isNumberOne is a low efficiency library to test if the given number is 1.
https://github.com/cromarmot/isnumberone
Last synced: 9 months ago
JSON representation
isNumberOne is a low efficiency library to test if the given number is 1.
- Host: GitHub
- URL: https://github.com/cromarmot/isnumberone
- Owner: CroMarmot
- Created: 2020-05-25T02:25:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-16T13:05:55.000Z (over 1 year ago)
- Last Synced: 2025-03-13T07:11:15.992Z (10 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@cromarmot/is-number-one
- Size: 206 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# isNumberOne
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://circleci.com/gh/CroMarmot/isNumberOne?branch=master)
isone is a low efficiency library to test if the given number is 1 implement with Unit function.

## install
```
yarn add @cromarmot/is-number-one
```
## Usage
```js
const isOne = require('@cromarmot/is-number-one');
isOne(1); // Returns true
isOne(-1); // Returns false
isOne(null); // Returns false
isOne("1"); // Returns false
```
## Test
```bash
yarn test
```
Will take a long time
## References
[Unit_function](https://en.wikipedia.org/wiki/Unit_function)
[Möbius_inversion_formula](https://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula)