Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rubystream/alchemist.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alchemist.js

Doing conversions for you so you don’t have to google them and making code more readable.

This work was inspired by ruby gem with similar name. It is not my attention to mimic the functionality of that gem.

Boy, those French: they have a different word for everything! Steve Martin

Usage

Once you include Alchemist.js in your code you can usit it like:

var foots = Alchemist.convert(2, "m").to("foot"),
    radians = Alchemist.convert(25, "degrees").to("radians"),
    degrees = Alchemist.convert(25, "arcminute").to("degrees"),
    ares = Alchemist.convert(2500, "square\_foot").to("ares"),
    fahrenheits = Alchemist.convert(36.5, "celsius").to("fahrenheit");

Alchemist.js has conversions for:

  • absorbed radiation dose
    • gray
    • grays
    • Gy
    • rad
    • rads
  • angles
    • radian
    • radians
    • degree
    • degrees
    • arcminute
    • arcminutes
    • arcsecond
    • arcseconds
    • mil
    • mils
    • revolution
    • revolutions
    • circle
    • circles
    • right_angle
    • right_angles
    • grad
    • grade
    • gradian
    • gon
    • grads
    • grades
    • gradians
    • gons
  • area
    • square_meter
    • square_meters
    • square_metre
    • square_metres
    • acre
    • acres
    • are
    • ares
    • a
    • barn
    • barns
    • b
    • circular_mil
    • circular_mils
    • hectare
    • hectares
    • ha
    • square_foot
    • square_feet
    • square_inch
    • square_inches
    • square_mile
    • square_miles
    • square_yard
    • square_yards
  • capacitance
    • farad
    • farads
    • F
    • abfarad
    • emu_of_capacitance
    • abfarads
    • emus_of_capacitance
    • statfarad
    • esu_of_capacitance
    • statfarads
    • esus_of_capacitance
  • distance
    • meter
    • metres
    • meters
    • m
    • fermi
    • fermis
    • micron
    • microns
    • chain
    • chains
    • inch
    • inches
    • in
    • microinch
    • microinches
    • mil
    • mils
    • rod
    • rods
    • league
    • leagues
    • foot
    • feet
    • ft
    • yard
    • yards
    • yd
    • mile
    • miles
    • mi
    • astronomical_unit
    • astronomical_units
    • au
    • ua
    • light_year
    • light_years
    • ly
    • parsec
    • parsecs
    • nautical_mile
    • nautical_miles
    • admirality_mile
    • admirality_miles
    • fathom
    • fathoms
    • cable_length
    • cable_lengths
    • angstrom
    • angstroms
    • pica
    • picas
    • printer_pica
    • printer_picas
    • point
    • points
    • printer_point
    • printer_points
  • dose equivalent
    • sievert
    • sieverts
    • Si
    • rem
    • rems
  • electric charge
    • coulomb
    • coulombs
    • C
    • abcoulomb
    • abcoulombs
    • ampere_hour
    • ampere_hours
    • faraday
    • faradays
    • franklin
    • franklins
    • Fr
    • statcoulomb
    • statcoulombs
  • electric conductance
    • siemen
    • siemens
    • S
    • mho
    • abmho
    • absiemen
    • absiemens
    • statmho
    • statsiemen
    • statsiemens
  • electrical impedance
    • ohm
    • ohms
    • abohm
    • emu_of_resistance
    • abohms
    • emus_of_resistance
    • statohm
    • esu_of_resistance
    • statohms
    • esus_of_resistance
  • electromotive force
    • volt
    • volts
    • V
    • abvolt
    • emu_of_electric_potential
    • abvolts
    • emus_of_electric_potential
    • statvolt
    • esu_of_electric_potential
    • statvolts
    • esus_of_electric_potential
  • energy
    • joule
    • joules
    • J
    • watt_second
    • watt_seconds
    • watt_hour
    • watt_hours
    • ton_of_tnt
    • tons_of_tnt
    • therm
    • therms
    • us_therm
    • us_therms
    • kilowatt_hour
    • kilowatt_hours
    • kilocalorie
    • kilocalories
    • calorie
    • calories
    • mean_kilocalorie
    • mean_kilocalories
    • mean_calorie
    • mean_calories
    • it_kilocalorie
    • it_kilocalories
    • it_calorie
    • it_calories
    • foot_poundal
    • foot_poundals
    • foot_pound_force
    • erg
    • ergs
    • electronvolt
    • electronvolts
    • eV
    • british_thermal_unit
    • british_thermal_units
    • mean_british_thermal_unit
    • mean_british_thermal_units
    • it_british_thermal_unit
    • it_british_thermal_units
  • force
    • newton
    • newtons
    • N
    • dyne
    • dynes
    • dyn
    • kilogram_force
    • kgf
    • kilopond
    • kiloponds
    • kp
    • kip
    • kips
    • ounce_force
    • ozf
    • poundal
    • poundals
    • pound_force
    • lbf
    • ton_force
  • illuminance
    • lux
    • lx
    • lumens_per_square_metre
    • lumens_per_square_meter
    • lumen_per_square_metre
    • lumen_per_square_meter
    • phot
    • phots
    • ph
    • lumens_per_square_foot
    • footcandle
    • lumen_per_square_foot
    • footcandles
  • inductance
    • henry
    • henrys
    • H
    • abhenrys
    • emus_of_inductance
    • abhenry
    • emu_of_inductance
    • stathenrys
    • esus_of_inductance
    • stathenry
    • esu_of_inductance
  • information storage
    • bit
    • bits
    • b
    • byte
    • bytes
    • B
    • nibbles
    • nybbles
  • luminous flux
    • lumen
    • lumens
    • lm
  • luminous intensity
    • candela
    • candelas
    • cd
  • magnetic flux
    • webers
    • Wb
    • maxwells
    • Mx
    • unit_poles
  • magnetic inductance
    • tesla
    • teslas
    • T
    • gamma
    • gammas
    • gauss
    • Gs
    • G
  • mass
    • gram
    • gramme
    • grams
    • grammes
    • g
    • carat
    • carats
    • ounce
    • ounces
    • oz
    • pennyweight
    • pennyweights
    • dwt
    • pound
    • pounds
    • lb
    • lbs
    • troy_pound
    • apothecary_pound
    • troy_pounds
    • apothecary_pounds
    • slug
    • slugs
    • assay_ton
    • assay_tons
    • AT
    • metric_ton
    • metric_tons
    • ton
    • tons
    • short_tons
  • power
    • watt
    • watts
    • W
    • british_thermal_unit_per_hour
    • british_thermal_units_per_hour
    • it_british_thermal_unit_per_hour
    • it_british_thermal_units_per_hour
    • british_thermal_unit_per_second
    • british_thermal_units_per_second
    • it_british_thermal_unit_per_second
    • it_british_thermal_units_per_second
    • calorie_per_minute
    • calories_per_minute
    • calorie_per_second
    • calories_per_second
    • erg_per_second
    • ergs_per_second
    • foot_pound_force_per_hour
    • foot_pound_force_per_minute
    • foot_pound_force_per_second
    • horsepower
    • boiler_horsepower
    • electric_horsepower
    • metric_horsepower
    • uk_horsepower
    • water_horsepower
    • kilocalorie_per_minute
    • kilocalories_per_minute
    • kilocalorie_per_second
    • kilocalories_per_second
    • ton_of_refrigeration
    • tons_of_refrigeration
  • pressure
    • pascal
    • pascals
    • Pa
    • atmosphere
    • atmospheres
    • technical_atmosphere
    • technical_atmospheres
    • bar
    • bars
    • centimeter_of_mercury
    • centimeters_of_mercury
    • centimeter_of_water
    • centimeters_of_water
    • gram_force_per_square_centimeter
    • dyne_per_square_centimeter
    • dynes_per_square_centimeter
    • foot_of_mercury
    • feet_of_mercury
    • foot_of_water
    • feet_of_water
    • inch_of_mercury
    • inches_of_mercury
    • inch_of_water
    • inches_of_water
    • kilogram_force_per_square_centimeter
    • kilogram_force_per_square_meter
    • kilogram_force_per_square_millimeter
    • kip_per_square_inch
    • kips_per_square_inch
    • ksi
    • millibar
    • mbar
    • millibars
    • mbars
    • millimeter_of_mercury
    • millimeters_of_mercury
    • millimeter_of_water
    • millimeters_of_water
    • poundal_per_square_foot
    • poundals_per_square_foot
    • pound_force_per_square_foot
    • pound_force_per_square_inch
    • psi
    • torr
    • torrs
  • radioactivity
    • becquerel
    • becquerels
    • Bq
    • curie
    • curies
    • Ci
  • temperature
    • kelvin
    • K
    • celsius
    • centrigrade
    • degree_celsius
    • degree_centrigrade
    • degrees_celsius
    • degrees_centrigrade
    • fahrenheit
    • degree_fahrenheit
    • degrees_fahrenheit
    • rankine
    • rankines
  • time
    • second
    • seconds
    • s
    • minute
    • minutes
    • min
    • sidereal_minute
    • sidereal_minutes
    • hour
    • hours
    • hr
    • sidereal_hour
    • sidereal_hours
    • day
    • days
    • sidereal_day
    • sidereal_days
    • shake
    • shakes
    • year
    • years
    • sidereal_year
    • sidereal_years
    • tropical_year
    • tropical_years
  • volume
    • litre
    • liter
    • litres
    • liters
    • l
    • L
    • barrel
    • barrels
    • bushel
    • bushels
    • cubic_meter
    • cubic_meters
    • cup
    • cups
    • imperial_fluid_ounce
    • imperial_fluid_ounces
    • ounce
    • ounces
    • fluid_ounce
    • fluid_ounces
    • imperial_gallon
    • imperial_gallons
    • gallon
    • gallons
    • imperial_gill
    • imperial_gills
    • gill
    • gills
    • gi
    • pint
    • pints
    • liquid_pint
    • liquid_pints
    • quart
    • quarts
    • liquid_quart
    • liquid_quarts
    • tablespoon
    • tablespoons
    • teaspoon
    • teaspoons

And some unusual measurements that you can find in code :-)

About

alchemist.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published