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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@charzing/vehicle-utils

v0.2.4

Published

Shared utilities for Charzing vehicle data management across all platforms (with dynamic Firestore mapping)

Downloads

674

Readme

@charzing/vehicle-utils

Shared utilities for Charzing vehicle data management across all platforms.

설치

로컬 개발 (npm link)

cd /Users/sungmin/charzing-vehicle-utils
npm install
npm run build
npm link

# 각 프로젝트에서
cd /Users/sungmin/charzing-admin
npm link @charzing/vehicle-utils

cd /Users/sungmin/CharzingApp-Expo
npm link @charzing/vehicle-utils

cd /Users/sungmin/desktop/project/react/charzing
npm link @charzing/vehicle-utils

주요 기능

1. 브랜드 매핑

import { normalizeBrandId, getBrandNameKorean, getBrandNameEnglish } from '@charzing/vehicle-utils';

// 브랜드 ID 정규화 (모두 소문자)
const brandId = normalizeBrandId('현대'); // 'hyundai'
const brandId2 = normalizeBrandId('BMW'); // 'bmw'

// 한글 브랜드명 가져오기
const korean = getBrandNameKorean('hyundai'); // '현대'

// 영문 브랜드명 가져오기
const english = getBrandNameEnglish('hyundai'); // 'HYUNDAI'

2. 모델 매핑

import { normalizeModelId, getModelNameKorean, getModelNameEnglish } from '@charzing/vehicle-utils';

// 모델 ID 정규화 (소문자, 하이픈)
const modelId = normalizeModelId('아이오닉 5'); // 'ioniq-5'
const modelId2 = normalizeModelId('Model S'); // 'model-s'

// 한글 모델명 가져오기
const korean = getModelNameKorean('ioniq-5'); // '아이오닉 5'

// 영문 모델명 가져오기
const english = getModelNameEnglish('ioniq-5'); // 'IONIQ-5'

3. 이미지 URL 생성

import { generateVehicleImageUrl, generateImageFilename } from '@charzing/vehicle-utils';

// Firebase Storage URL 생성
const imageUrl = generateVehicleImageUrl({
  brand: 'hyundai',
  model: 'ioniq-5',
  year: 2024,
  trim: 'exclusive'
});
// → https://firebasestorage.googleapis.com/v0/b/charzing-d1600.firebasestorage.app/o/
//   vehicle-images%2FHYUNDAI%2FIONIQ-5%2F2024%2Fhyundai__ioniq-5__2024__exclusive.png?alt=media

// 이미지 파일명만 생성
const filename = generateImageFilename({
  brand: 'hyundai',
  model: 'ioniq-5',
  year: 2024,
  trim: 'exclusive'
});
// → 'hyundai__ioniq-5__2024__exclusive.png'

// 트림 없는 경우
const filename2 = generateImageFilename({
  brand: 'tesla',
  model: 'model-s',
  year: 2024
});
// → 'tesla__model-s__2024.png'

4. 파일명 규칙

  • 패턴: {brandSlug}__{modelSlug}__{year}__{trimSlug}.png
  • 예시:
    • hyundai__ioniq-5__2024.png
    • mini__cooper__2025__jcw.png
    • tesla__model-3__2024__highland.png
  • 규칙:
    • 전부 소문자
    • 단어 구분: 하이픈 (-)
    • 상위 구분: 더블 언더바 (__)
    • trim 없으면 생략

개발

# 의존성 설치
npm install

# 빌드
npm run build

# Watch 모드로 빌드
npm run dev

# 테스트
npm test

# 타입 검사
npm run type-check

# 린트
npm run lint

라이선스

MIT