samuelmarina / is-odd Goto Github PK
View Code? Open in Web Editor NEWIs a number odd?
Is a number odd?
Please add unit testing; using your is-even library for checks.
idk how but i know it'd be useful for my tech startup react nextjs vercel blazingly fast sveltekit project :)
I am looking to deploy a NodeJS server on FAT12 storage. I can only have up to about 4,000 files and I'm already very close to the limit due to the many other files from my other Node modules, including is-even. Clearly the fact that this repo has divided its code between 10 total files is a massive issue for my use case and my company. If all the js files were merged into one then I would have just enough room to implement my code.
function isOdd(n) {
n % 2 != 0 ? console.log("Number is odd.") : console.log("Number is even.");
}
isOdd(1) // "Number is odd."
isOdd(2) // "Number is even."
comeBackToU2ube = "Bruh! Don't destroy Tesla, destroy Youtube"
console.log(`${comeBackToU2ube.length%2!==0}`)
This is a serious issue and it should be fixed. My company depends on the functionality of this package.
while opening one of files via "View raw"
Running the code results in the error:
/home/runner/LemonchiffonWirelessSoftwaresuite/node_modules/@samuelmarina/is-odd/index.js:1
import twoMil from './2mil'
^^^^^^
SyntaxError: Cannot use import statement outside a module
Can I suggest also:
type oddNumber = twoMilOdd | fourMilOdd | ... etc.
Where:
type twoMilOdd = 1 | 3 | 5 | ... etc.
So isOdd can be a type guard:
function isOdd(value: number): value is oddNumber { ... }
The is-even project is amazing, and I was thinking if we could use that package as a dependency to this project (I think you can imagine where this is going).
We can use the isEven function to check if the number is even, if it returns false, it's odd. That way everyone can focus all their manpower on just the is-even project.
Please do correct me if I'm wrong.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.