3.0.0 • Published 1 month ago

@taxbit/utilities v3.0.0

Weekly downloads
-
License
-
Repository
-
Last release
1 month ago

Taxbit Utilities

Options Functions

Options functions will return an array of objects with a label and value property

import {
  getCaProvinceOptions,
  getCountryOptions,
  getMonthOptions,
  getUsStateOptions,
} from '@taxbit/utilities';

Example

getCountryOptions('en'); // [{ value: 'AF', label: 'Afghanistan' }, ...]

Code Arrays

Code arrays are available for direct import, these are arrays of allowed ISO values for country, US state, and CA province.

For months, the array is an array of strings "01", "02", ... "12".

import {
  caProvinceCodes,
  countryCodes,
  monthCodes,
  usStateCodes,
} from '@taxbit/utilities';

Example

countryCodes; // ['AF', 'AX', 'AL', ...]

Label Functions

Label functions will accept a code and language parameter. Language is optional and defaults to 'en'.

import {
  getCaProvinceLabel,
  getCountryLabel,
  getMonthLabel,
  getUsStateLabel,
} from '@taxbit/utilities';

Example

getCountryLabel('AL', 'fr'); // 'Albanie'
3.0.0

1 month ago

0.3.2

3 months ago

2.0.0

2 months ago

0.3.0

5 months ago

0.2.7

5 months ago

0.2.6

5 months ago

0.3.1

4 months ago

0.2.5

5 months ago

0.2.4

7 months ago

0.2.3

7 months ago

0.2.2

7 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.1.0

9 months ago

0.0.0

12 months ago