An npm package to check if a number is equal to 13 with a fluent, chainable API.
is-thirteen is a JavaScript npm package designed to check if a number equals 13. It provides a fluent, chainable API that allows developers to perform this check in various ways, including mathematical operations and approximate comparisons. The package solves the problem of needing a more expressive and fun method for a basic equality test.
JavaScript developers looking for a humorous or creative utility for number validation, particularly those working on projects where readability and playful code are valued.
Developers choose is-thirteen for its unique, chainable API that makes simple checks more expressive and enjoyable, offering features like mathematical operations and flexible comparisons not found in standard equality tests.
Check if a number is equal to 13.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides chainable methods like `is(13).thirteen()` and `is(12.8).roughly.thirteen()`, making code readable and playful, as demonstrated in the README examples.
Allows performing calculations with `plus`, `minus`, `times`, and `divideby` before checking equality, enabling checks like `is(14).minus(1).thirteen()` which returns true.
Includes `roughly.thirteen()` for approximate checks and `within().of.thirteen()` for range-based validation, offering nuanced checks beyond basic equality.
Embraces humor with a WTFPL license and creative documentation, turning a trivial task into an enjoyable coding exercise.
Only validates if a number equals 13, making it impractical for any other equality checks and reducing its utility in broader applications.
The README admits 'we moved fast and broke things', indicating past breaking changes and potential unreliability in updates or maintenance.
For simple equality checks, using `=== 13` is more efficient and straightforward; this library adds abstraction and dependencies without significant benefit.