Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/idriskulubi/iszeroorless
A simple TypeScript utility package to check if a number is zero or less.
https://github.com/idriskulubi/iszeroorless
node-js npm npm-package
Last synced: 25 days ago
JSON representation
A simple TypeScript utility package to check if a number is zero or less.
- Host: GitHub
- URL: https://github.com/idriskulubi/iszeroorless
- Owner: IdrisKulubi
- Created: 2024-12-08T16:06:04.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-18T18:02:35.000Z (about 2 months ago)
- Last Synced: 2025-01-12T06:22:03.592Z (26 days ago)
- Topics: node-js, npm, npm-package
- Language: TypeScript
- Homepage:
- Size: 9.4 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# iszeroorless
A simple TypeScript utility package to check if a number is zero or less.
## Installation
```bash
npm install iszero-or-less
```## Usage
```typescript
import isZeroOrLess from 'iszero-or-less';isZeroOrLess(0); // true
isZeroOrLess(-1); // true
isZeroOrLess(1); // false
```## API
### `isZeroOrLess(num: number): boolean`
Returns `true` if the input number is less than or equal to zero, `false` otherwise.
### Running Tests
```bash
npm test
```### Building
```bash
npm run build
```## Publishing
1. Update version in `package.json`
2. Build the package: `npm run build`
3. Run tests: `npm test`
4. Publish to npm: `npm publish`## License
MIT