npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

validator-bic-code

v2.0.8

Published

A simple bic Validator

Downloads

41

Readme

OverView

해당 라이브러리는 해상 ISO 6346 (BIC) Codes의 적합성을 판별하는 라이브러리 입니다

Rules

B.I.C (Bureau International des Containers et du Transport Intermodal) 는 다음과 같은 규칙을 가집니다.

  1. 모든 ISO 컨테이너는 11개의 고유한 디지털 코드가 부여된다

  2. 선주 코드(Owner code)

    • 컨테이너 번호 중에서 앞 3자리의 알파벳은 선주 코드를 의미합니다. 이 선주 코드는 BIC(International Container Bureau)에 의해 관리됩니다. BIC로부터 한 번 발급받은 선주 코드는 10년 동안 유지됩니다.
  3. 장비 구분 코드(Equipment category code)

    • 선주 코드 다음이며 앞에서 4번째 자리의 알파벳은 해당 장비의 구분을 위해 만들어진 코드입니다. U는 높이나 너비와 상관없이 컨테이너를 의미합니다. J는 컨테이너와 분리가 가능한 장비를 의미하며 엔진 발전기가 이에 해당합니다. Z는 컨테이너 수송에 필요한 트레일러나 차대(섀시)를 의미합니다.
  4. 일련번호(Serial number)

    • 장비 구분 코드 다음으로 따라오는 6개의 숫자들은 선주가 발행한 일련번호입니다. 이 일련번호의 발행과 각각의 컨테이너에 대한 고유번호의 관리는 선주에게 책임이 존재합니다.
  5. Check digit

    • 컨테이너 번호의 가장 마지막 숫자가 'Check digit'에 해당합니다. 이 숫자는 앞의 컨테이너 번호를 이용하여 공식을 통해 계산하면 구할 수 있습니다. 또한, 이 Check digit을 통해 앞의 컨테이너 번호가 올바른 컨테이너 번호임을 확인하며 컨테이너 번호로서의 효력을 가지게 만들어주는 중요한 역할을 담당합니다.

계산과정

  1. 다음과 같은 매핑 테이블을 이용해 알파벳을 변환합니다 | A | B | C | D | E | F | G | H | I | J | K | L | M | | - | - | - | - | - | - | - | - | - | - | - | - | - | | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 37 | 38 |

  2. 왼쪽 부터 2의 거듭제곱을 곱해줍니다

    | 첫번째 | 두번째 | 세번째 | 네번째 | 다섯번째 | 여섯번째 | 일곱번째 | 여덟번째 | 아홉번째 | 열번째 | | ------ | ------ | ------ | ------ | -------- | -------- | -------- | -------- | -------- | ------ | | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 |

  3. 각각의 값을 모두 합산합니다

  4. 합산한 값을 11로 나눠줍니다

  5. 나눠준값을 내림 처리 합니다

  6. 다시 11을 곱해줍니다

  7. 3 에서 얻은 합산한 값과 11을 곱해준 값의 차를 구합니다

  8. BIC의 CheckDigit(마지막 11자리번째 수) 와 같은지 확인합니다

Reference

rollup declaration BIC - 컨테이너 코드의 의미