Test whether a value belongs to this package's shared Quantity core.
Any value, including null or undefined.
Whether the value is a Quantity from the default, regex, or custom entry point.
Plain definitions and instances from another copy of the package do not pass this check.
import { Quantity } from '@neutrium/quantity';import { isQuantity } from '@neutrium/quantity/guards.js';isQuantity(new Quantity('1 m')); // trueisQuantity(null); // falseisQuantity({ scalar: 1 }); // false Copy
import { Quantity } from '@neutrium/quantity';import { isQuantity } from '@neutrium/quantity/guards.js';isQuantity(new Quantity('1 m')); // trueisQuantity(null); // falseisQuantity({ scalar: 1 }); // false
Test whether a value belongs to this package's shared Quantity core.