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 🙏

© 2024 – Pkg Stats / Ryan Hefner

convertjs

v0.0.5

Published

This is a simple conversion library

Downloads

10

Readme

convert.js

version badge GitHub issues GitHub forks GitHub stars Gitter

This is a simple conversion library - https://yazilimmuhendisiyizbiz.github.io/convert-js-website/


Bower Install

bower install convert.js

npm Install

npm install convertjs

convert.Metric(data, source, target)

convert.Metric(1, "cm", "m");
=> 0.01

convert.Metric(1, "hm", "inch");
=> 3937.0078740157

convert.Metric(1, "km", "mm");
=> 1000000

convert.Metric("string", "dam", "yard");
=> false

convert.DataUnits(data, source, target)

convert.DataUnits(1, "mb", "kb");
=> 1024

convert.DataUnits(1, "byte", "tb");
=> 9.0949470177293e-13

convert.DataUnits("string", "gb", "pb");
=> false

convert.Temperature(data, source, target)

convert.Temperature(1, "c", "k");
=> 274.15

convert.Temperature(1, "n", "c");
=> 3.0303030303030303

convert.Temperature(1, "f", "n");
=> -5.68323

convert.Temperature("string", "k", "f");
=> false

convert.Angle(data, source, target)

convert.Angle(100,"rad","second");
=> 20626480.624709636

convert.Angle(1009,"deg","rad");
=> 0.000017297613993997318 

convert.Angle(1009,"grad","rad");
=> 4.804892776110367e-9

convert.Angle("string", "second", "grad");
=> false

convert.Time(data, source, target)

convert.Time(1, "second", "millisecond");
=> 1000

convert.Time(1, "hour", "minute");
=> 60

convert.Time(1, "week", "year");
=> 0.019164955509925

convert.Time("string", "day", "century");
=> false

convert.Energy(data, source, target)

convert.Energy(1, "j", "kj");
=> 0.001

convert.Energy(1, "kcal", "cal");
=> 1000

convert.Energy(1, "j", "cal");
=> 0.2388458966275

convert.Energy("string", "mj", "j");
=> false

convert.Astronomical(data, source, target)

convert.Astronomical(1, "lightSecond", "mile");
=> 186282.39705

convert.Astronomical(1, "au96", "lightYear_julian");
=> 0.000015812507409

convert.Astronomical(1, "km", "lightDay");
=> 3.8606955463e-11

convert.Astronomical("string", "lightYear_traditional", "m");
=> false

convert.Speed(data, source, target)

convert.Speed(19, "m/s", "km/s");
=> 0.019

convert.Speed(19, "s/light", "km/s");
=> 5696056.702

convert.Speed(19, "ft/s", "km/s");
=> 30.00057912

convert.Speed(19, "ma", "kn");
=> 12567.946004319654

convert.Speed("string", "ft/s", "km/s");
=> false

convert.Periodic(data)

convert.Periodic(18);
=> "Ar"

convert.Periodic(10);
=> "Ne"

convert.Periodic(120);
=> "Ubn"

convert.Periodic(0);
=> false

convert.Periodic("convertdotjs");
=> false

convert.Ampere(data, source, target)

convert.Ampere(1, "ampere", "mA");
=> 0.0001

convert.Ampere(1, "kiloA", "megaA");
=> 

convert.Ampere(1, "nanoA", "gigaA");
=> 1e-18

convert.Ampere("string", "mikroA", "ampere");
=> false

convert.ObjectToArray(data, divider)

convert.ObjectToArray("hello\nworld", "\n");
=> ["hello", "world"] 

convert.ObjectToArray("hello, world", ",");
=> ["hello", "world"] 

convert.ObjectToArray("hello", "");
=> ["h", "e", "l", "l", "o"] 

convert.JsontoXML(obj)

data =   {
  "kutuphane": {
    "kitap": [
      " Kitap 1",
      " Kitap 2"
    ]
  }
}
	 
convert.JsontoXML(data);
=><kutuphane>
	<kitap> Kitap 1</kitap>
	<kitap> Kitap 2</kitap>
  </kutuphane>