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

hephys

v1.0.8

Published

High Energy Physics Units and Constants

Readme

HEPhys Module

This module written in JavaScript has the units and constants used everyday in High Energy Physics calculations.

HEPhys is based on CLHEP - A Class Library for High Energy Physics, which is written in C++. This HEPhys specifically presents the same units and constants that are defined in files PhysicalUnits.h and PhysicalConstants.h.

One way to use it is:

    var HEP = require('hephys');
    var radiuscircle = 3.4 * HEP.cm; 
    var perimeter = radiuscircle * HEP.twopi;
    var area      = Math.pow( radiuscircle, 2) * HEP.pi;
    console.log( "area = %d cm2", area / HEP.cm2 );
    console.log( "area = %d m2", area / HEP.m2 );
    console.log( "perimeter = %d cm", perimeter / HEP.cm );
    console.log( "perimeter = %d m", perimeter / HEP.m );

Public Functions

Static Public Variables

HEP.pi

HEP.pi2

HEP.halfpi

HEP.twopi

Length Units

HEP.millimeter = 1

HEP.mm = 1

HEP.millimeter2

HEP.millimeter3

HEP.centimeter

HEP.cm

HEP.centimeter2

HEP.cm2

HEP.centimeter3

HEP.cm3

HEP.meter

HEP.m

HEP.meter2

HEP.m2

HEP.meter3

HEP.m3

HEP.liter

HEP.L

HEP.dL

HEP.cL

HEP.mL

HEP.kilometer

HEP.km

HEP.kilometer2

HEP.km2

HEP.kilometer3

HEP.km3

HEP.parsec

HEP.pc

HEP.micrometer

HEP.um

HEP.nanometer

HEP.nm

HEP.angstrom

HEP.fermi

HEP.barn

HEP.millibarn

HEP.microbarn

HEP.picobarn

Angle Units

HEP.radian = 1

HEP.rad = 1

HEP.milliradian

HEP.mrad

HEP.degree

HEP.deg

HEP.steradian = 1

HEP.sr = 1

Time Units

HEP.nanosecond = 1

HEP.ns = 1

HEP.second

HEP.s

HEP.millisecond

HEP.ms

HEP.microsecond

HEP.us

HEP.picosecond

Electric Charge Units

HEP.eplus = 1

HEP.e_SI

HEP.coulomb

Energy Units

HEP.megaelectronvolt = 1

HEP.MeV

HEP.electronvolt

HEP.eV

HEP.gigaelectronvolt

HEP.GeV

HEP.teraelectronvolt

HEP.TeV

HEP.petaelectronvolt

HEP.PeV

HEP.joule

Mass Units

HEP.kilogram

HEP.kg

HEP.gram

HEP.g

HEP.milligram

HEP.mg

Power Units

HEP.watt

Force Units

HEP.newton

Pressure Units

HEP.hep_pascal

HEP.bar

HEP.atmosphere

Electric Current Units

HEP.ampere

HEP.milliampere

HEP.microampere

HEP.nanoampere

Electric Voltage Units

HEP.megavolt

HEP.kilovolt

HEP.volt

Electric Resistance Units

HEP.ohm

Capacitance Units

HEP.farad

HEP.millifarad

HEP.microfarad

HEP.nanofarad

HEP.picofarad

Magnetic Field Units

HEP.tesla

HEP.gauss

HEP.kilogauss

Magnetic Flux Units

HEP.weber

Inductance Units

HEP.henry

Temperature Units

HEP.kelvin = 1

Amount of Substance Units

HEP.mole = 1

Activity Units

HEP.hertz

HEP.kilohertz

HEP.megahertz

HEP.becquerel

HEP.Bq

HEP.kilobecquerel

HEP.kBq

HEP.megabecquerel

HEP.MBq

HEP.gigabecquerel

HEP.GBq

HEP.curie

HEP.Ci

HEP.millicurie

HEP.mCi

HEP.microcurie

HEP.uCi

Absorbed Dose

HEP.gray

HEP.kilogray

HEP.milligray

HEP.microgray

Luminous Intensity

HEP.candela = 1

Luminous Flux

HEP.lumen = 1

Illuminance

HEP.lux

Miscelanea

HEP.perCent = 0.01

HEP.perThousand = 0.001

HEP.perMillion = 0.000001

Constants

HEP.Avogadro

HEP.c_light

HEP.c_squared

HEP.h_Planck

HEP.hbar_Planck

HEP.hbarc

HEP.hbarc_squared

HEP.electron_charge

HEP.e_squared

HEP.electron_mass_c2

HEP.proton_mass_c2

HEP.neutron_mass_c2

HEP.amu_c2

HEP.amu

HEP.mu0

HEP.epsilon0

HEP.elm_coupling

HEP.fine_structure_const

HEP.classic_electr_radius

HEP.electron_Compton_length

HEP.Bohr_radius

HEP.alpha_rcl2

HEP.twopi_mc2_rcl2

HEP.k_Boltzmann

HEP.STP_Temperature

HEP.STP_Pressure

HEP.kGasThreshold

HEP.universe_mean_density