Skip to content

twonfi/is-funny

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-funny

Returns true if the value is a funny number.

I was surprised this package didn't exist, considering so many other useless packages exist on npm.

Install

The npm package is is-funny.

I will not tell you how to install this package because I can't keep track of the new package managers that come out so often.

Usage

const isFunny = require('is-funny');

isEven(0);
//=> false
isEven(432);
//=> false
isEven('67');
//=> true
isEven(42);
//=> true
isEven(420);
//=> true

Why is this needed?

It isn't.

What numbers are "funny"?

From Celeste themselves:

I don't even get funny numbers. In my opinion, anything that contains 67, 69, 420, and more counts.

Why is a funny number sometimes not funny? Why is a non-funny number sometimes funny?

Once again, from Celeste:

As my middle school teacher taught me, "context matters." This is why the function tries to determine context with a 95% accuracy.

Unfortunately, a piece of code with one input can't determine context, which is why a random bit flip is used.


MIT License

Copyright (c) 2026 twonum / Celeste

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Returns true if the value is a funny number.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors