Skip to content

Releases: varna/measure-ts

Moved from imperials quarters to american quarters

04 Nov 14:49
Compare
Choose a tag to compare

v3.2.3

24 Sep 08:42
Compare
Choose a tag to compare
  • hotfixes unitKey returned from measureFrom (#17) 9bb0e8e

v3.2.2...v3.2.3

Rounding / Extensions

24 Sep 07:12
Compare
Choose a tag to compare

You can now use rounding function:

import { rounder } from 'measure-ts'
const rounded = rounder(number_of_floating_digits)(value)

You can also get UnitKey or extension from Measure:

describe('unitKey', () => {
  test('m', () => {
    const measure = new Measure(1, 'm')
    expect(measure.unitKey).toBe('m')
  })
  test('cm', () => {
    const measure = new Measure(1, 'cm')
    expect(measure.unitKey).toBe('cm')
  })
  test('m2', () => {
    const measure = new Measure(1, 'm2')
    expect(measure.unitKey).toBe('m2')
  })
  test('cm3', () => {
    const measure = new Measure(1, 'cm3')
    expect(measure.unitKey).toBe('cm3')
  })
})

describe('extension', () => {
  test('m', () => {
    const measure = new Measure(1, 'm')
    expect(measure.extension).toBe('m')
  })
  test('cm', () => {
    const measure = new Measure(1, 'cm')
    expect(measure.extension).toBe('cm')
  })
  test('m2', () => {
    const measure = new Measure(1, 'm2')
    expect(measure.extension).toBe('m²')
  })
  test('cm3', () => {
    const measure = new Measure(1, 'cm3')
    expect(measure.extension).toBe('cm³')
  })
})

Reverted

29 Aug 06:22
Compare
Choose a tag to compare

Exporting UnitKey

29 Aug 06:16
Compare
Choose a tag to compare

Negative

28 Aug 15:56
Compare
Choose a tag to compare

Added tests and fixes for negative values in Measure selector fromMeasure.
v3.0.1 didn't reach NPM.

Negative

28 Aug 15:50
0db1f9c
Compare
Choose a tag to compare

Added tests and fixes for negative values in Measure selector fromMeasure.

Annotations

26 Jul 07:52
Compare
Choose a tag to compare

v2.0.3...v3.0.0

v2.0.3

17 Jul 11:19
Compare
Choose a tag to compare

v2.0.2...v2.0.3

v2.0.2

17 Jul 10:57
Compare
Choose a tag to compare

v2.0.1...v2.0.2