Settings accepted by the factory and Quantity.withConfig(). Numeric options belong to the selected adapter. All properties are optional; omitted settings inherit from the parent class, without mutating that class.
Quantity.withConfig()
import { Quantity } from '@neutrium/quantity';const Q = Quantity.withConfig({ cache: { conversionResults: false } });const q = new Q('1 m');q.to('cm') === q.to('cm'); // false: converted results are not retained Copy
import { Quantity } from '@neutrium/quantity';const Q = Quantity.withConfig({ cache: { conversionResults: false } });const q = new Q('1 m');q.to('cm') === q.to('cm'); // false: converted results are not retained
Optional
Quantity cache policy; false disables all optional caches, true restores their defaults.
Numeric settings interpreted by the selected adapter.
Settings accepted by the factory and
Quantity.withConfig(). Numeric options belong to the selected adapter. All properties are optional; omitted settings inherit from the parent class, without mutating that class.Example