JavaScript test for integer / string

I couldn’t find either of these functions that satisfied my edge cases or desire for simplicity so I wrote/adapted some of my own. Feel free to use, modify, distribute without attribution, but I’d be eternally grateful if you did ;)

The test for integer is adapted from this post, which is actually almost spot on, apart from their is_int([0]) returns true, as does any integer in a string.

I’m pretty sure I’ve seen this test for string a hundred times on the internet and in books. It is by far the most robust:

Please let me know if you can break it!

4,596 thoughts on “JavaScript test for integer / string

  1. Oops! This website isn’t available in your region Connect with us Who doesn’t love a bit of free entertainment? We know we do! At Jackpotjoy, we offer a variety of free games that you can play for the chance to win cash or free spins without spending a penny**.Check out our free games collection and see what surprises are in store. It’s a cracking way to try out new games and maybe even pocket a prize while having fun. Plus, don’t forget you can take all our online slot games for a spin without wagering, thanks to demo mode! Available to all our wonderful Jackpotjoy members, demo mode lets you practice slot games before you buy, so you can get comfortable with the rules and find the perfect game for you. Get Red Hot Rewards at Virgin Games! Our team of testers put all the exciting offers and thrilling games on-site to the test, creating an incredible environment for players.
    https://thehiddenframers.com/queenwinloginuk-official-site-a-review-for-uk-players/
    Upload your rough cut video file to Vmaker AI or start with a recording Access thousands of static and animated objects in the free online video editor. Embellish your video with frames, arrays, lines, and shapes, and easily create amazing videos. As a novice video editor, I started with a free video editing software that only had very basic tools. VideoPad includes a number of templates to streamline your video editing process. From full video templates which include placeholders for footage, text, and graphics, to simple text animations, getting started editing videos has never been easier. Yes, you can easily edit your video’s title in one easy step. To edit the title of your generated video, simply double-click on the current title at the top, and type in your new title. Once you’ve made the changes, click the green checkmark and your modifications will be saved!

  2. online pokies gambling free video – Wilma,
    australia, uk no deposit casino bonus 2021 and casino chip values usa,
    or bingo uk online

  3. Самара всем привет Брат снова сорвался Дети напуганы Таблетки не помогают Короче единственное что вытащило из запоя — вывод из запоя недорого с выездом Через пару часов человек пришёл в себя В общем вся инфа по ссылке — вывод из запоя на дому вывод из запоя на дому Не ждите пока станет хуже Перешлите тем кто в такой же ситуации

  4. latest online casinos canada, usa visa slots availability what
    are the odds of rolling a seven in craps (Blaine) hyderabad 2021 and canadian pokies
    winners, or casino online united kingdom free

  5. VN steps up like it’s ready to spar with desktop editors. Multi-track editing means you’re layering clips, audio, and effects without breaking a sweat. Keyframes? Hell yeah—animate that text or zoom in precise as a sniper. Precision controls let you tweak every frame, no sloppy guesswork. Transitions go beyond basic fades—think cinematic wipes or custom curves. It’s overkill for a quick Instagram Story, but if you’re cutting a YouTube intro or a short film, VN’s got the muscle. It’s an app for editors who don’t mess around. Repurpose long videos into platform-ready shorts for TikTok, Instagram, and YouTube. Starting from scratch? Generate complete videos from text prompts using our AI video generator. Plus, collaborate with your team in real-time and access your projects from any browser—no software download required. Start editing for free and create professional content in minutes.
    https://md.picasoft.net/s/CucGwoyTC9
    Cast your net and reel in colossal wins with Bigger Bass Bonanza, a lively 12-payline video slot packed with fishing gear, golden fish, and instant cash prizes. Like Starburst, Gonzo’s Quest, Mega Moolah and Gates of Olympus, the original Big Bass Bonanza can be considered a classic of the slots genre, and it was deservedly an award winner. There are also enough good variants in the series (Big Bass Bonanza: Keeping It Reel, Big Bass Hold and Spinner Megaways) to justify Pragmatic Play’s obsession with this game. But after 25 editions, even the biggest Big Bass fan would struggle to justify any more fishy outings. Feature-wise, Bigger Bass Bonanza doesn’t offer anything new, although players can benefit from an extra row and larger Money symbols. The base game may not be stimulating, but things heat up once the Free Spins round is triggered.

  6. Big Bass Bonanza wasn’t much of a game when it was discovered after being released into the waters by Pragmatic Play. It offers players simplified gaming dynamics, but its free spins bonus game caught the eye of many fishing slot enthusiasts.  Monetary incentives are distributed to player that signup with an Online Casino. Initially, they’ll acquire various promotions after formalising an account. The finances retained throughout those bonuses can be positioned towards gambling products like Bigger Bass Bonanza™. You’ll maintain superior capabilities at accentuating your wager & this way acquiring game modifiers like the Scattered Bass Free Spins or Fishermen Wilds. We’ve identified what readers can anticipate from those bonus features down below. Malfunction voids all plays and pay. RTP is 94.50%.
    https://flavia.webinanedemos.com/ninjacasinouk-casino-access-review-why-the-ninja-uk-website-is-a-favorite-among-uk-players/
    CapCut is a free video editing tool owned by ByteDance — the Chinese tech company better known for being behind video-sharing app TikTok. As such, CapCut syncs rather well with TikTok and is an ideal free choice if you’re looking to create video for the platform. Free to download for Windows and Mac, the desktop version offers more advanced functionality than the popular mobile app version that features in our best video editing apps for phones guide. I’m open to both free and paid options, but reliability and ease of use are my top priorities. If you’ve used any great video editing tools on Windows 11, I’d love to hear your experiences and suggestions! The Smart Conform function examines your clips and crops them accordingly to focus on the primary element in the video and ensure they are sized correctly for different platforms. This is ideal for marketers who want to publish their videos on different social media platforms. Since each platform has its own size requirement, this can save so much time in the long run.

  7. united kingdom casino guide 2021 review, united statesn casino
    online gambling forecast, Jocelyn, and new no deposit casino 2021 australia, or online casino australia best payout

  8. Люди помогите советом Муж просто потерял себя Жена в истерике В больницу тащить страшно Короче единственное что вытащило из запоя — выведение из запоя на дому качественно Через пару часов человек пришёл в себя В общем жмите чтобы сохранить — вывести из запоя на дому вывести из запоя на дому Не ждите пока станет хуже Перешлите тем кто в такой же ситуации

  9. Motionleap offers intuitive tools like sky replacement, water animation, and camera FX to create visually striking moving photos. Ideal for creatives and Instagram posts. ImgPlay is another app you can use to animate photos. Think of it like a mashup between Motionleap and Werble. It creates ready-to-use animated photos for the web, and has advanced, easy-to-understand controls. Unfortunately, it also sticks a watermark on your image—one that you can’t remove unless you upgrade to a full account. So, that’s the full list of 10 free AI tools to animate your images. Whether you want to create talking avatars, immersive 3D environments, or simple animations, these tools are perfect for breathing new life into your content. Creating video clips from your images has never been easier. Our AI generator works in just a few simple steps. Upload your photo, add your prompts, customize features, and let AI generate your video instantly.
    https://clickitspy.com/sweety-win-casino-uk-slot-wins-tips-and-tricks/
    Great use case. I usually do it slowly appearing from top to bottom or bottom to top Animoto also has a few cool features like split screen templates, which are awesome if you want to produce a “how to video”. You could shoot a person explaining something in one section, while showing the visual of that thing being done in another section. To save your time and energy, we have tried a bunch of great split screen video editor apps for Android on the market. Here we present you Vidstitch Free – Video Collage. It is easy to combine your videos and photos, with the help of a simple and intuitive user interface. It allows you to rotate your video or pic by long-pressing. You can preview the video collage before saving it. A split screen video editor allows you to merge multiple videos into one frame. It is perfect for creative storytelling, social media, professional projects, and countless other scenarios. In this blog, we discovered the top 4 split screen video editor tools.

  10. Neew brunswock gayPics off tin cocksCollin fareel porn videoFree onn lime boobsThaai gayy tubeAnimaated porn wallpapersAfrdican bigg breast fuck moviesStip club coljmbia ssouth carolinaSixty-nine lesbianSwinging in piblic tubeCategry
    move popular shemale specificSusiie berst pornAlll tubes pola
    rey analSeex craeing girlss vidsGaay meen ucking assholesAmaturte housewives nakedNuude teen bbs portalVintagye burgundy mustang fastbackDaddy and daugher sex freee picsMaale anal seex vibratorsSilvia sulller pornoEl paso
    nudeKamodo drazgon sexTwoo penis picsPregnant adjlt dvdsAdult pfotection coordinating councilCarucaturas
    japonesas xxx gratisSapphkre bivtits hardcoreThumbnaill slut postCaam
    clip frere hoot poorn webBreas caancer srvivors blogsPeerfect brasil titsVaricocele limit spermLizz tewen model teenFreee lastex bdsm moviesTinny toion adultAuto ownedrs insurance sucksFreee pon pictuures forr latexFists oon black doctorsLirttle giirl pussy
    storiesLingerrie byy exposedWoman octor aass openValkley anus acuta tandemSuperhesd cumshotBlacck and whitte wiufe swap cumshotMy
    wite want riugh sexDaad andd sonn jawck ooff storyLaex tutorial documentclassStaar was fake hentaiEmbeer reigns hardcoreFreee douchng pornLargve breastd grandmothersDoggysxtyle aanal experienceJohnn hoolms fuchk video clipsNaled midtet
    vikdeos freeMilley cyruhs naked shotsThe gamme oof tsen titansZero tolerance xxxFreee lire time
    seex videos memberchipWheee too gget ree prn filtersNaed imagews of salma hayekNudee erca
    duranceAmueteer podn clipsSongs forr arult birthdaay partyMoocross pornMaary
    mcc donnell nudeFingdring lesbian picTeeen dawting advice chatCarmrn pppe nude archivee
    picsSexyy lesbians lichk feetPorno dde mii mamaFreee liil
    tteen pornLesbiian sewch videosMixed combat erotic storiesSexyy gowns
    forr womenPictures off cocks inn condumsAnal grand thft ztodStoriees dog slutsGayy nude menn cumPlumpies naked frse videis gets ass fuckedSeexy jaapanese grandmaAduot women tubesAnnna
    millerr sexCrossdrexers amatewur videoRusian hme pornoLichhelle marie fuccked
    videosNudde ldy does vidro interviewsNuude erika badeu ofvd9wuapts7d43q5iqe

  11. online is the route 66 casino open (Klaus) canada real money roulette, united
    kingdom online casino real money free bonus and canada
    casino download free game, or new zealandn online gambling pokies

  12. The most powerful mobile video editor around. Download Splice and start creating stunning videos within minutes. This app has been a long time favorite of mine. Never glitches and is fast at uploading a lot of videos. Super reliable. I love making my reels through this app and home videos set to music. Must have for me. Wherever you are on the spectrum of filmmakers, shooting and editing videos with your iPhone comes with its own set of issues. There are basic tools to crop and trim your iPhone video in Photos and iMovie. But if you found iMovie to be clunky or lack functionality, check out the alternatives we’ve found. Below are the ten best video editing apps for iPhone, from super basic to advanced and professional. LumaFusion is by far the best iPhone video editor. It’s built to look and feel like a traditional desktop editor similar to Adobe Premiere or Final Cut Pro for mobile devices, and has some impressive capabilities and services for creating.
    https://datos.csjn.gov.ar/user/subtdocnenis1983
    Hit the button and we’ll send you this post for later, plus subscribe you to our awesome (free!) Primal Video Insider updates! Movavi’s Video Editor is a powerful desktop video editor that offers both manual and automatic creation modes. You can edit to your heart’s content or craft a carefully themed video in as little as five steps. As a best free video editor, DaVinci Resolve offers unparalleled value, providing features that compete with premium software options, making it a user-friendly choice for anyone interested in video editing. Limitations for free users. Only some of the editors featured in my shortlist are completely free—the rest are free versions of premium apps. I only considered apps that satisfied my criteria of being able to export at 1080p or better with no watermark and without any limits on the number of exports performed. Some apps include optional premium aspects, like transitions, effects, and tools that are nice to have but not essential for performing simple edits.

  13. Big Bass Bonanza has a classic 5×3 reel setup with 10 paylines, but what really stands out is its thrilling free spins round, stacking wilds, and the chance to win up to 2,100 times your stake. Dive in for more! It’s important to note that this is a high volatility game, meaning wins may come less frequently, but when they do, they can be quite substantial, ideal for if you’re seeking bigger rewards with a bit more risk… In this Big Bass Bonanza beginner’s guide, we’ll tell you: Copyright © Bally’s Corporation and or its affiliates and licensors 2025. All rights reserved.  Released in April 2025, Big Bass Bonanza 1000 sees Big Bass Bonanza meet the 1000 series. Very similar other games in the Big Bass slots series, it’s played on 5 reels and 10 paylines from 10p a spin. In the free spins, Fisherman Wilds collect fish money symbols which are worth up to 1,000 x your total bet. Every 4th Fisherman Wild gives you more free spins and applies a win multiplier up to 10x to collected fish money symbols. With a 96.51% RTP rate, this game offers 20,000 x bet max wins (joint top with Big Bass Hold & Spinner Megaways). 
    https://pad.codefor.fr/s/JIQKtTnOTv
    Find the best video editing apps for 2025 – LumaFusion ($30), CapCut (free), and more for Android, iPhone, and iPad. Explore top picks and start editing now! Now that you know how to edit videos on your iPhone and enhance your footage with equipment like the NearStream VM20 4K Camera and CCD30 4K Capture Card, you’re ready to create videos that truly stand out. By pairing these tools with iPhone’s easy-to-use editing apps, you can produce professional-level content without the need for expensive editing software or bulky equipment. Mojo, the best free video editing app on iPhone allows, in a very simple way, to make your video montages and slideshows. You just have to import photos and videos on the app, and then use the multitude of features which are offered to you: change the orientation and crop, merge elements, invert, or split them, delete parts, make a slow motion, etc.

  14. Ребята у кого бизнес Объездил кучу контор — везде одно и то же То логотип кривой Короче мужики с руками из правильного места — сувенирные подарки с логотипом недорого Цены ниже чем у других на 30 В общем смотрите сами по ссылке — корпоративные сувениры с логотипом https://korporativnye-podarki-merch.ru Проверяйте производителя по этому списку Перешлите тому у кого бизнес

  15. One of our most popular lessons! Get creative when you use code to make animated characters bust a move in this introductory activity. Requires sound, reading. You are using an outdated browser. Please upgrade your browser to improve your experience. One Click to make photo dance with temporal consistency with this AI image dance generator. Everyone can dance now, no dancing lessons are required! Animate characters and avatars with our AI. From ‘dance avatar ai’ to ‘character dancing ai free’, create engaging animations. Learn ‘how to make ai dance videos’ and ‘how to make a dancing video with your face’ for a fun-filled journey. Clipfly AI twerking generator also offers users the feature to customize their twerking videos by selecting from a variety of backgrounds, so that if you want to dance on a beach, stage, or outer space, our twerk dance generator can integrate your animated figures into any setting to change the background, enhancing the visual appeal. If you are unhappy with all those preset backgrounds, you can also upload the background yourself.
    http://www.muzikspace.com/profiledetails.aspx?profileid=143102
    Object animations apply to individual elements on a slide, such as text boxes, shapes, or images. These animations allow you to control how specific objects appear, move, or disappear during your presentation. For example, you can make an image “Fly In From Left To Right” to draw attention to it or use a “Fade-In” effect to introduce bullet points in a sequence. These effects are popular because they add motion to static elements, making your slides more engaging. Ever felt like your Google Slides look a bit too plain? If you’re trying to figure out how to make an animation in Google Slides, you’re not alone. Maybe you want your bullet points to appear one by one, or your images to fade in smoothly. Whether you’re putting together a school project, a work As for beginners, FlexClip, known as a powerful online slideshow maker, would be a nice choice. It is a free and simple-to-use tool, enabling you to animate any objects in a picture slideshow video within minutes. On FlexClip’s website, you can enjoy a variety of animation effects, such as Fade In & Out, Zoom In & Out, Bounce In & Out, Popup, Wipe, Rotate, Flip, etc. In addition, you can use pre-made text animations and add transitions, background music, stickers to enhance your slideshow. Let’s see how to use animation effects on FlexClip.

  16. Всем привет из Москвы Замучился я уже с этими бумагами Друзья уже полгода мучаются Короче нашел нормальных специалистов — получение гражданство израиля в москве без нервов Через 2 месяца получили паспорт В общем жмите чтобы не потерять — гражданство израиля получить москва гражданство израиля получить москва Доверьтесь профессионалам Перешлите тому кто думает о репатриации

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>