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

flowsnake

v1.0.0

Published

Open Source library used by the Flowsnake mobile application.

Downloads

55

Readme

Flowsnake

Flowsnake is an Open Source library used by the Flowsnake mobile application. It's a ES6 library so it can also be used with NodeJS, React Native and on modern browsers.

Flowsnake is possible thanks to:

Install & usage

npm install -s flowsnake

For example to convert from Celsius to Kelvin use:

import Flowsnake from 'flowsnake'; // ES6
const Flowsnake = require('flowsnake'); // NodeJS

const res = Flowsnake.convert(1).from('°C').to('K');
res.eq(274.15) // true!

Features

Unit Conversion

Flowsnake includes many many many unit conversions. Check the units README for a complete list.

Example

For example to convert from Celsius to Kelvin use:

const res = Flowsnake.convert(1).from('°C').to('K');
res.eq(274.15) // true!

Calculators

Flowsnake includes some easy to use calculators:

  • Download time calculator.
  • Tip calculator.
  • Prime factorization.
  • Divisors.
  • Body Mass Index (BMI).
  • Body Fat Percentage (BFP).
  • Ohm's Law.
  • Electricity Cost.
  • Loan Calculator.
  • Resistor color code calculator (from colors to resistance [Ω] and viceversa).
  • Inductor color code calculator (from colors to inductance [µH] and viceversa).

Algebra

  • Combinations & permutations
  • Greatest Common Denominator & Lowest Common Multiplier
  • Fraction Simplifier
  • Proportions

Example

// Calculate Download Time
const values = {
    size: Flowsnake.unit(28).as('GB'),
    speed: Flowsnake.unit(300).as('Mbps')
};
const seconds = Flowsnake.calculate('download-time').of(values);
const minutes = Flowsnake.convert(seconds).to('min');
minutes.equals(12.4445); // true!

// Prime factors
Flowsnake.calculate('prime-factors').of(147); // '3×7²'

Geometry

  • Triangle
  • Square
  • Rectangle
  • Rhombus
  • Parallelogram
  • Circle

Check the Geometry README for more information.

Example

// Solve a circle
const s = Circle.of({radius: 50});

s.diameter -> 100
s.area -> 7853.98
s.circumference -> 314.16

Contribute

You want to add a new system of units (for example, Imperial Frequency) it's very easy. First read this guide.

Make sure that all tests (including yours) and lint run correctly with npm test.

Checkout the list of issues and vote for the next features to add.

TODO

  • Support on-the-fly units.
  • Support configuration of Math.js
  • More and more units!!!
  • Numeral systems
  • Field strength
  • Heat
  • Magnetism
  • Radiation
  • Electric
    • Resistivity
  • Linear charge/current density
  • Surface charge/current density
  • Volume charge density
  • Airflow
  • Specific Volume
  • Inertia
  • Computers
    • Typography