An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# isNumberOne

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

[![CircleCI](https://circleci.com/gh/CroMarmot/isNumberOne/tree/master.svg?style=svg)](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.

![ins meme](https://www.instagram.com/p/Bvg9fI1ndcE/media/?size=m)

## 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)