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

converjs

v1.2.4

Published

An easy way to convert & parse things!

Downloads

36

Readme

ConverJS

Parse, convert strings, numbers etc. with ease.!

Stats

npm version license release code size gh forks gh stars

Changelog

CHANGELOG.md

Before Installation

npm init -y

Installation

npm i converjs

Usage

const converjs = require("converjs/conver.js");

const conver = new converjs();

// Methods

conver.jsonParse('{"fruit": "apple"}');
// Result: { fruit: 'apple' }

conver.jsonStringify({ fruit: "apple" });
// Result: {"fruit": "apple"}

conver.toCelsius(50);
// Result: 10

conver.toFahrenheit(10);
// Result: 50

conver.HexToRgb("#bf5e45");
// Result: { r: 191, g: 94, b: 69 }

conver.RgbToHex(191, 94, 69);
// Result: #bf5e45

conver.TextToBinary("Cool");
// Result: 1000011 1101111 1101111 1101100

conver.BinaryToText("1000011 1101111 1101111 1101100");
// Result: Cool

conver.DateToMs("2021-06-20 16:35");
// Result: 1624199700000

conver.MsToDate(1624199700000);
// Result: 20/06/2021, 16:35:00

conver.Base64Encode("You're cool!");
// Result: WW91J3JlIGNvb2wh

conver.Base64Decode("WW91J3JlIGNvb2wh");
// Result: You're cool!

conver.Currency({
  price: 100,
  from: "USD",
  to: "EUR",
});
// Result: 84.3028 (This might change when you try it.)

conver.FileStream({
  text: "I'm cool!",
  filename: "cool",
  exportAs: "txt", // or in any file format
});
// Result: A file.

conver.MDtoHTML("# I'm a big heading.");
// Result: <h1>I'm a big heading.</h1>
// This markdown parser currently supports:
/*
 * All heading from h1 to h6 / #,##,### etc.
 * Bold and Italic / *asd* , **asd**
 * <strong><em> / ***asd***
 * <blockqoute> / >
 * <code> / `const me = require('you')`
 * Links / [GOOGLE](https://www.google.com "MY BEST FRIEND")
 * Images / ![GOOGLE](https://napidroid.hu/wp-content/uploads/google-logo-header-01.jpg)
 */

conver.HTMLtoMD("<h1>I'm a big heading.</h1>");
// Result: # I'm a big heading.
// This parser basically supports the same things as above.

conver.Length({
  length: 10,
  from: "km",
  to: "miles",
});
// Result: 6.2139999999999995
/* Options
 * from    to
 * miles   km
 * km      miles
 * km      m
 * km      cm
 * km      mm
 * m       km
 * m       cm
 * m       mm
 * cm      m
 * cm      mm
 * miles   feet
 * miles   yards
 */
conver.Mass({
  mass: 10,
  from: "kg",
  to: "g",
});
// Result: 10000
/* Options
 * from    to
 * t       kg
 * kg      g
 * g       kg
 * g       mg
 * mg      g
 * kg      mg
 * mg      kg
 * g       cg
 * cg      mg
 */

conver.Data({
  value: 10,
  from: "gb",
  to: "mb",
});
// Result: 10240
/* Options
 * from    to
 * tb      gb
 * gb      mb
 * gb      kb
 * gb      b
 * mb      kb
 * kb      b
 */

conver.BBCodeToHTML("[b]I'm bold[/b]");
// Result: <b>I'm bold</b>
/* Supported BBCode
 * [b], [i], [u], [s]
 * [url], [img], [email]
 * [color], [size]
 * [quote], [code]
 */

conver.HTMLToBBCode("<i>I'm italian!</i>");
// Result: [i]I'm italian![/i]
/* Supported HTML
 * <b>, <i>, <u>, <s>
 * <a>, <img>, <address><a href="mailto:">
 * <span style="color: #">, <span style="font-size: 0>
 * <blockqoute>, <pre>
 */

License

MIT

Contributing

To make a pull request go to: https://github.com/TheMarci/converjs/pulls
You find a bug? Go to: https://github.com/TheMarci/converjs/issues

And that's all for now. Thanks for downloading! 👍