Input | !Number.isNaN(x) |
!isNaN(x) |
typeof x === 'number' |
isFinite(x) |
Number.isFinite(x) |
Number.isInteger(x) |
Number.isSafeInteger(x) |
---|---|---|---|---|---|---|---|
123 |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
"123" |
✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
NaN |
❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ |
"NaN" |
✅ | ❌ | ❌ | ❌ | ❌ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
// curl --request GET \ | |
// --url 'https://frc-api.firstinspires.org/v3.0/2023/teams?eventCode=casf' \ | |
// --header 'Authorization: Basic <token>}' | |
import rawSf from "./sf/raw.json" assert { type: "json" }; | |
import * as fs from "fs/promises"; | |
const teams = rawSf.teams.map((team) => team.teamNumber); |
I hereby claim:
- I am jonahsnider on github.
- I am jonahsnider (https://keybase.io/jonahsnider) on keybase.
- I have a public key whose fingerprint is E3D7 8B8F 4596 CD63 5F30 4439 E85C E1D3 1913 2409
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Math.random('discord.com/nitro').toString(26).substring(2, 15) + Math.random('discord.com/nitro').toString(26).substring(2, 7)).split('').map((c, i) => (i + 1) % 4 === 0 ? c + '-' : c).join('').replace(/..$/, '').toUpperCase() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const four = () => process.toString().big().endsWith(String.fromCharCode(18 + ((process.toString().substring(1, 2).charCodeAt(Number.MIN_VALUE)) * 4) - Math.pow(20, 2))).toString().length; | |
console.log(four()); // 4 | |
const assert = require("assert"); | |
const fourButReadable = () => { | |
// String that contains an o as the second character | |
const objectInString = process.toString(); | |
assert.strictEqual(objectInString, "[object process]"); |