amp-is-number is a small, focused utility function originally developed as part of the Ampersand.js ecosystem. It provides a straightforward method to determine if a given JavaScript value is a number, including numeric strings, consistent with the logic prevalent in projects from the mid-2010s. Ampersand.js itself was a modular, Backbone.js-inspired framework, and `amp-is-number` was one of many atomic modules designed for composability. The package is at version 1.0.1, which appears to be its final release. There is no active development or release cadence for this specific utility, nor for the broader Ampersand.js project, which is considered abandoned. This package exclusively uses CommonJS module syntax, reflecting the standard module patterns of its era, and it lacks explicit support for modern ECMAScript modules (ESM). It differs from more recent `is-number` implementations by not necessarily incorporating newer JavaScript language features or edge case handling, instead focusing on the behavior expected within its original framework context.
npm install amp-is-numberVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the `isNumber` function to check various data types.
For ESM environments, use `const isNumber = await import('amp-is-number');` and access the function via `isNumber.default()`, or configure your build system (e.g., Webpack, Rollup) to handle CommonJS modules.For new projects, consider using native `Number.isFinite()` or a more modern, actively maintained `is-number` utility package if its specific string-to-number coercion behavior is not strictly required. For existing projects, be aware of its unmaintained status.
Review the source code of `amp-is-number` if precise behavior for edge cases is critical for your application to ensure it aligns with expectations. Consider migrating to `Number.isFinite()` or a modern alternative if a more standard or robust number check is needed.
If in an ESM file, use `await import('amp-is-number')` and access the default export: `(await import('amp-is-number')).default(value)`. Alternatively, switch your file to CommonJS if possible, or ensure your build tools are correctly transpiling.No dependency data recorded yet.