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 🙏

© 2026 – Pkg Stats / Ryan Hefner

brand-model-variant-selector

v1.0.6

Published

An npm package to select brand, model, and variant.

Readme

brand-model-variant-selector

A lightweight and efficient npm package to select brand, model, and variant data for twowheelers.


🚀 Features

  • Comprehensive Database: 126 motorcycle brands, 108 models, and 166 variants with detailed specifications
  • Lightweight: No external dependencies, ensuring a small package size (~2KB gzipped)
  • Efficient: Functions are optimized for data filtering, and the data is included directly within the package for fast lookups
  • Well-typed: JSDoc comments provide clear type definitions, which is great for modern IDEs
  • Production Ready: Full test coverage with 20+ test cases and automated CI/CD pipeline
  • Reliable: Automated testing and publishing with conflict resolution

📦 Installation

To add this package to your project, run the following command in your terminal:

npm install brand-model-variant-selector

💻 Usage

Get all brands

This function retrieves an array of all available brands (126 brands).

import { getBrands } from 'brand-model-variant-selector';

const brands = getBrands();
console.log(brands);
// [
//   { id: 'b001', name: 'ABZO' },
//   { id: 'b100', name: 'Honda' },
//   { id: 'b123', name: 'Royal Enfield' }
// ]

Get all models

This function retrieves an array of all available models, regardless of brand (108 models).

import { getAllModels } from 'brand-model-variant-selector';

const allModels = getAllModels();
console.log(allModels);
// [
//   { id: 'm1001', brandId: 'b100', name: 'Activa', slug: 'activa' },
//   { id: 'm1002', brandId: 'b100', name: 'CB350', slug: 'cb350' },
//   { id: 'm1089', brandId: 'b123', name: 'Classic', slug: 'classic' }
// ]

Get all variants

This function retrieves an array of all available variants, regardless of model (166 variants).

import { getAllVariants } from 'brand-model-variant-selector';

const allVariants = getAllVariants();
console.log(allVariants);
// [
//   { id: 'v001', modelId: 'm1001', name: '125', specs: { engine: '125cc Air-cooled', type: 'Scooter' } },
//   { id: 'v002', modelId: 'm1001', name: '6G', specs: { engine: '110cc Air-cooled', type: 'Scooter' } },
//   { id: 'v003', modelId: 'm1002', name: 'RS', specs: { engine: '350cc Liquid-cooled', type: 'Motorcycle' } }
// ]

Get variants for a specific model

This function returns all variants for a given model ID.

import { getVariants } from 'brand-model-variant-selector';

const activaVariants = getVariants('m1001');
console.log(activaVariants);
// [
//   { id: 'v001', modelId: 'm1001', name: '125', specs: { engine: '125cc Air-cooled', type: 'Scooter' } },
//   { id: 'v002', modelId: 'm1001', name: '6G', specs: { engine: '110cc Air-cooled', type: 'Scooter' } }
// ]

Get models by brand

This function returns all models for a specific brand.

import { getModels } from 'brand-model-variant-selector';

const hondaModels = getModels('b100');
console.log(hondaModels);
// [
//   { id: 'm1001', brandId: 'b100', name: 'Activa', slug: 'activa' },
//   { id: 'm1002', brandId: 'b100', name: 'CB350', slug: 'cb350' },
//   { id: 'm1003', brandId: 'b100', name: 'Hornet', slug: 'hornet' }
// ]

🔧 CI/CD Pipeline

This package features automated CI/CD with:

  • Automated Testing: 20+ test cases run on every commit
  • Smart Publishing: Automatic version bumping and NPM publishing
  • Conflict Resolution: Handles version conflicts intelligently
  • GitHub Actions: Complete workflow from commit to published package

🤝 Contribution

Contributions are welcome! If you find a bug or have a suggestion, please feel free to open an issue or a pull request on the GitHub repository.