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

gsp-version

v0.0.6

Published

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Readme

GSP Version

License: MIT

개요

  • GSP 관련 툴 및 로직을 작성시, 서버 및 클라이언트에서 사용하는 버전을 비교, 연산, 관리 등을 NodeJS 에서 편하게 사용하기 위한 프로젝트 입니다.
  • 빌더 패턴으로 메서드 체이닝을 지원합니다.

규칙

  • 버전의 표현은 #.##.## 형식을 사용합니다.
    1. 첫번 째 항목은 Release 버전을 나타냅니다. ex) 1.##.##
    2. 두번 째 항목은 Major 버전을 나타냅니다. ex) #.01.##
    3. 세번 째 항목은 Minor 버전을 나타냅니다. ex) #.##.01
  • Release 를 제외하고 나머지는 두 자리만 표현 하며 100이상의 숫자가 될 경우 그 앞쪽 버전으로 올림 됩니다. ex) 1.00.99 에서 Minor 버전이 1 증가시 1.01.00

설치

  • npm install gsp-version

사용법

  • 버전 초기화
var Version = require('gsp-version');

// 생성자에 매개변수가 없다면 기본 0.00.00 이 됩니다.
var version1 = new Version();

// 위 규칙에 맞는 문자열로 버전을 만듭니다.
version1.fromString("1.00.00");

// Release, Major, Minor 순서의 숫자를 인자로 버전을 만듭니다.
version1.fromNumber(1, 0, 0);

// 생성자 호출시 규칙에 맞는 문자열로 버전을 만듭니다.
var version2 = new Version("2.0.0");
  • 일치 검사
var Version = require('gsp-version');

var version1 = new Version();
version1.fromString("1.00.00");
var version2 = new Version("1.00.01");

// false
version1.equals(version2);

// true
version1.equalsFromString("1.00.00");
  • 버전 비교
var Version = require('gsp-version');

var version1 = new Version();
version1.fromString("1.00.00");
var version2 = new Version("1.00.01");

// version2 보다 version1 이 작으므로 -1
version1.compareTo(version2);

// 0.00.99 보다 version1 이 크므로 1
version1.compareToString("0.00.99");