shopify-hscode

The shopify hscode collection lib

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
shopify-hscode
1.0.12 years ago2 years agoMinified + gzip package size for shopify-hscode in KB

Readme

shopify-hscode
!npm packagenpm-imgnpm-url !Build Statusbuild-imgbuild-url !Downloadsdownloads-imgdownloads-url !Issuesissues-imgissues-url !Code Coveragecodecov-imgcodecov-url !Commitizen Friendlycommitizen-imgcommitizen-url !Semantic Releasesemantic-release-imgsemantic-release-url License: MIT
hscode collection in a library

Install

# npm
npm install shopify-hscode
# yarn
yarn add shopify-hscode

Usage

import { getAllHSCode } from 'shopify-hscode';

getAllHSCode();
//=> [{
      section: 'I',
      hscode: '01',
      description: 'Animals; live',
      parent: 'TOTAL',
      level: '2',
      },...]

API

getHSCodeChild(parent?:string)

get; the list of hscode childs. If not proide by default will return top level hs codes.

parent

Type: string parent hs code number

searchHSCodeByName(hsCodeName?:string)

filter out the hscode matching given string in description of hscode.

hsCodeName

Type: string search param

searchHSCodeById(hsCode?:string)

filter out the hscode having given string in hscode numebr.

hsCode

Type: string valid hscode

getHSCode(id:string)

get hscode by hscode number

id

Type: string valid hscode

getAllHSCode()

get complete list of hscode available in library