Skip to content

BF-zh/Courier-Validation

Repository files navigation

courier-validation

npm version npm downloads bundle

Installation

npm install courier-validation

Usage

import { courier } from 'courier-validation'

console.log(courier.get('SF1000000000000')) // {  alias: 'SF', name: '顺丰', reg: /^SF[a-z0-9]\d{12}$/i, }
console.log(courier.validate('SF', 'SF1000000000000')) // true

API

courier.get(orderNumber: string): Courier

获取快递公司信息

courier.validate(courierCode: string, orderNumber: string): boolean

验证快递单号是否合法

获取快递公司信息

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published