UNPKG

@alwatr/is-number

Version:

A simple utility to Check the value is number or can convert to a number, for example string ' 123 ' can be converted to 123.

237 lines (133 loc) 13.4 kB
# Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [5.6.1](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@5.6.0...@alwatr/is-number@5.6.1) (2025-04-01) **Note:** Version bump only for package @alwatr/is-number ## [5.6.0](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@5.5.0...@alwatr/is-number@5.6.0) (2025-03-18) ### Features * **is-number:** add polyfill for Number.isFinite to check finite numbers ([27c60b1](https://github.com/Alwatr/nanolib/commit/27c60b16e69e87fd62dee25ee21012651b9ba7ca)) by @alimd * **is-number:** add toNumber function to convert various values to numbers ([3f4a9d1](https://github.com/Alwatr/nanolib/commit/3f4a9d1d316ba685c47cafdee031e231ef0d40c5)) by @alimd ### Code Refactoring * **is-number:** enhance isNumber function to handle additional cases and improve documentation ([16f16b4](https://github.com/Alwatr/nanolib/commit/16f16b41c487f874f94dd64aaa778c618879db82)) by @alimd ## [5.5.0](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@5.4.0...@alwatr/is-number@5.5.0) (2025-03-06) ### Miscellaneous Chores * update username casing in changelog entries ([9722ac9](https://github.com/Alwatr/nanolib/commit/9722ac9a078438a4e8ebfa5826ea70e0e3a52ca6)) by @ ### Dependencies update * bump the development-dependencies group across 1 directory with 11 updates ([720c395](https://github.com/Alwatr/nanolib/commit/720c3954da55c929fe8fb16957121f4c51fb7f0c)) by @dependabot[bot] ## [5.4.0](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.8...@alwatr/is-number@5.4.0) (2025-02-18) ## 5.3.0 (2025-02-03) ### Miscellaneous Chores * edit README ([3860b3d](https://github.com/Alwatr/nanolib/commit/3860b3df48ab82dc479d5236c2e8579df614aabf)) by @ ### Dependencies update * bump the development-dependencies group across 1 directory with 11 updates ([cb79d07](https://github.com/Alwatr/nanolib/commit/cb79d072a57c79e1c01abff1a293d6757bb65350)) by @ * update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages ([ddab05b](https://github.com/Alwatr/nanolib/commit/ddab05b5d767c30191f36a065e4bc88744e8e3fe)) by @ ## 5.0.0 (2024-11-02) ### ⚠ BREAKING CHANGES * To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies. ### Code Refactoring * use the same version as @alwatr/nanolib ([60eb860](https://github.com/Alwatr/nanolib/commit/60eb860a0e33dfffe2d1d95e63ce54c60876be06)) by @ ## [5.3.0](https://github.com/Alwatr/nanolib/compare/v5.2.1...v5.3.0) (2025-02-03) ### Miscellaneous Chores * edit README ([3860b3d](https://github.com/Alwatr/nanolib/commit/3860b3df48ab82dc479d5236c2e8579df614aabf)) by @ArmanAsadian ### Dependencies update * bump the development-dependencies group across 1 directory with 11 updates ([cb79d07](https://github.com/Alwatr/nanolib/commit/cb79d072a57c79e1c01abff1a293d6757bb65350)) by @dependabot[bot] * update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages ([ddab05b](https://github.com/Alwatr/nanolib/commit/ddab05b5d767c30191f36a065e4bc88744e8e3fe)) by @alimd ## 5.0.0 (2024-11-02) ### ⚠ BREAKING CHANGES * To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies. ### Features * **is-number:** extract from @alwatr/util ([1c8a676](https://github.com/Alwatr/nanolib/commit/1c8a676ccefcad12436f41b96eeb39c60cc09040)) by @ * **is-number:** Update is-number package description and add Number.isFinite polyfill ([a7c8e38](https://github.com/Alwatr/nanolib/commit/a7c8e38eb3e939199cf5637feaf08ac0ed98e2e6)) by @ * use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @ ### Bug Fixes * all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @ * **is-number:** Remove Number.isFinite polyfill ([aa149f3](https://github.com/Alwatr/nanolib/commit/aa149f302f96d961b058fc3a9d70399c1023cbe3)) by @ ### Code Refactoring * prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @ * use the same version as @alwatr/nanolib ([60eb860](https://github.com/Alwatr/nanolib/commit/60eb860a0e33dfffe2d1d95e63ce54c60876be06)) by @ ### Miscellaneous Chores * **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @ * **deps:** update ([8e70dff](https://github.com/Alwatr/nanolib/commit/8e70dffb1e751496ef2e72d6cffd685f1fea44e3)) by @ * include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @ * **is-number:** Add additional keywords to is-number package.json ([048b734](https://github.com/Alwatr/nanolib/commit/048b734bffc65d61876f692f69dab55a829ea0c8)) by @ * **is-number:** Add additional keywords to is-number package.json ([7ba726c](https://github.com/Alwatr/nanolib/commit/7ba726cb53a784ccc1dd37dab92b27ff833b3881)) by @ * **is-number:** change the license to AGPL-3.0 ([3ad68cb](https://github.com/Alwatr/nanolib/commit/3ad68cb43659fe2af8358ff1393e0085e85b8857)) by @ * **is-number:** Update version to 1.0.0-alpha.0 in package.json ([d20bcad](https://github.com/Alwatr/nanolib/commit/d20bcad4fe9f997d7e8153a99955576d9fa59ee9)) by @ * Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @ * Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @ * Update test scripts and dependencies ([93d2fe6](https://github.com/Alwatr/nanolib/commit/93d2fe6d7ce9c38a300e0c7ed75874916767a14b)) by @ ### Dependencies update * bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @ * bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @ * bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @ * bump the development-dependencies group with 2 updates ([be5d6c2](https://github.com/Alwatr/nanolib/commit/be5d6c2d86b937f32cebc6848aaff85af07055dd)) by @ * upd ([451d025](https://github.com/Alwatr/nanolib/commit/451d0255ba96ed55f897a6f44f62cf4e6d2b12be)) by @ * update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @ * update all ([53342f6](https://github.com/Alwatr/nanolib/commit/53342f67a8a013127f073540bc11929f1813c05c)) by @ * update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @ * update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @ * upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @ ## [1.1.8](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.7...@alwatr/is-number@1.1.8) (2024-11-02) **Note:** Version bump only for package @alwatr/is-number ## [1.1.7](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.6...@alwatr/is-number@1.1.7) (2024-10-25) **Note:** Version bump only for package @alwatr/is-number ## [1.1.6](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.5...@alwatr/is-number@1.1.6) (2024-10-12) **Note:** Version bump only for package @alwatr/is-number ## [1.1.5](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.4...@alwatr/is-number@1.1.5) (2024-10-11) ### Code Refactoring - prevent side-effects ([01e00e1](https://github.com/Alwatr/nanolib/commit/01e00e191385cc92b28677df0c01a085916ae677)) by @mohammadhonarvar ## [1.1.4](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.3...@alwatr/is-number@1.1.4) (2024-10-11) ### Miscellaneous Chores - include LICENSE and LEGAL files to publish ([09f366f](https://github.com/Alwatr/nanolib/commit/09f366f680bfa9fb26acb2cd1ccbc68c5a9e9ad8)) by @alimd ## [1.1.3](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.2...@alwatr/is-number@1.1.3) (2024-10-11) **Note:** Version bump only for package @alwatr/is-number ## [1.1.2](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.1...@alwatr/is-number@1.1.2) (2024-10-10) ### Dependencies update - bump the development-dependencies group with 10 updates ([fa4aaf0](https://github.com/Alwatr/nanolib/commit/fa4aaf04c907ecae06aa14000ce35216170c15ad)) by @dependabot[bot] ## [1.1.1](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.1.0...@alwatr/is-number@1.1.1) (2024-10-08) **Note:** Version bump only for package @alwatr/is-number ## [1.1.0](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.11...@alwatr/is-number@1.1.0) (2024-09-29) ### Features - use `package-tracer` ([cc3c5f9](https://github.com/Alwatr/nanolib/commit/cc3c5f9c1a3d03f0d81b46835665f16a0426fd0d)) by @mohammadhonarvar ### Bug Fixes - all dependeny topology ([1c17f34](https://github.com/Alwatr/nanolib/commit/1c17f349adf3e98e2a80ab2da4f0f81028dc9c5f)) by @mohammadhonarvar ### Miscellaneous Chores - **is-number:** change the license to AGPL-3.0 ([3ad68cb](https://github.com/Alwatr/nanolib/commit/3ad68cb43659fe2af8358ff1393e0085e85b8857)) by @ArmanAsadian - Update build and lint scripts ([392d0b7](https://github.com/Alwatr/nanolib/commit/392d0b71f446bce336b0256119a80f07aff794ba)) by @alimd ### Dependencies update - bump @types/node ([3d80fed](https://github.com/Alwatr/nanolib/commit/3d80fedaf720af792feb060c2f81c737ebb84e11)) by @dependabot[bot] ## [1.0.11](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.10...@alwatr/is-number@1.0.11) (2024-09-21) **Note:** Version bump only for package @alwatr/is-number ## [1.0.10](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.9...@alwatr/is-number@1.0.10) (2024-09-15) ### Dependencies update - bump the development-dependencies group across 1 directory with 10 updates ([9ed98ff](https://github.com/Alwatr/nanolib/commit/9ed98ffd0668d5a36e255c82edab3af53bffda8f)) by @dependabot[bot] - update ([c36ed50](https://github.com/Alwatr/nanolib/commit/c36ed50f68da2f5608ccd96119963a16cfacb4ce)) by @alimd ## [1.0.9](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.8...@alwatr/is-number@1.0.9) (2024-08-31) ### Miscellaneous Chores - Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @ ## [1.0.8](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.7...@alwatr/is-number@1.0.8) (2024-08-31) ### Dependencies update - update all dependencies ([1e0c30e](https://github.com/Alwatr/nanolib/commit/1e0c30e6a3a8e19deb5185814e24ab6c08dca573)) by @alimd ## [1.0.7](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.6...@alwatr/is-number@1.0.7) (2024-07-04) ### Dependencies update - update all dependencies ([0e908b4](https://github.com/Alwatr/nanolib/commit/0e908b476a6b976ec2447f864c8cafcbb8a0f099)) by @ ## [1.0.6](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.5...@alwatr/is-number@1.0.6) (2024-05-12) ### Dependencies update - upgrade ([6dbd300](https://github.com/Alwatr/nanolib/commit/6dbd300642c9bcc9e7d0b281e244bf1b06eb1c38)) by @alimd ## [1.0.5](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.4...@alwatr/is-number@1.0.5) (2024-04-25) **Note:** Version bump only for package @alwatr/is-number ## [1.0.4](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.3...@alwatr/is-number@1.0.4) (2024-03-28) **Note:** Version bump only for package @alwatr/is-number ## [1.0.3](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.2...@alwatr/is-number@1.0.3) (2024-01-31) ### Miscellaneous Chores - **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @alimd ## [1.0.2](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.1...@alwatr/is-number@1.0.2) (2024-01-24) **Note:** Version bump only for package @alwatr/is-number ## [1.0.1](https://github.com/Alwatr/nanolib/compare/@alwatr/is-number@1.0.0...@alwatr/is-number@1.0.1) (2024-01-20) **Note:** Version bump only for package @alwatr/is-number # 1.0.0 (2024-01-16) ### Bug Fixes - **is-number:** Remove Number.isFinite polyfill ([aa149f3](https://github.com/Alwatr/nanolib/commit/aa149f302f96d961b058fc3a9d70399c1023cbe3)) by @alimd ### Features - **is-number:** extract from @alwatr/util ([1c8a676](https://github.com/Alwatr/nanolib/commit/1c8a676ccefcad12436f41b96eeb39c60cc09040)) by @njfamirm - **is-number:** Update is-number package description and add Number.isFinite polyfill ([a7c8e38](https://github.com/Alwatr/nanolib/commit/a7c8e38eb3e939199cf5637feaf08ac0ed98e2e6)) by @alimd