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

@84paris/84.tools

v0.1.2

Published

84.tools is a collection of helpers for your projects

Downloads

14

Readme

84.tools

84.tools is a collection of helpers for your projects

List of helpers

colors

  • hexToRgb - Convert hexadecimal color string to rgba string
  • rgbToHex - Convert RGB(A) color string to HEX string
  • toObject - Convert RGB(A) or HEX color string to RGBA object

dom

  • destroyVideo - Properly destroy HTMLVideoElement taking care of removing it from memory
  • getIndex - Get index of specific element relative to its parent
  • getURLParameters - Retrieve all URL GET parameters

maths

  • calculatAspectRatioFit - This method calculate the ratio depending of an specified maxWidth & maxHeight
  • clamp - Clamp a value between two bounds
  • closestInArray - Return the closest value|index of an array from a specified value
  • degrees - Convert radians to degrees
  • getPointOnCircle - Method to get a point from a circle and an angle
  • getPointsAngle - Return the angle between 2 points
  • getPointsDist - Return the distance between two points
  • getRandomFloat - Generate a random float between a min and max values
  • getRandomInt - Generate a random int between a min and max values
  • getSlope - Get the slope value from two points
  • prependZeros - This method prepend an amout of 0 to a string|number
  • radians - This method prepend an amout of 0 to a string|number - Convert degrees to radians
  • range - Return a new value linearly interpolate between a new min and max
  • rectHitTest - Check if two rectangle are overlaping

How to use

You can add this project as a dependency in your project.

You can require it or just the methods you need via Browserify.

How to contribute

If you want to add methods to this collection :

  • Each file can contain only one function to export.
  • The function and the file must have the same name.
  • Add your new function to the global category file. For example, if you add a maths helpers, add your file into the maths directory and add require this file into maths.js.
  • In case the category doesn't exists, create the directory of the category and the category file at root. And be sure to require this category file into index.js.
  • Write a bunch of test for your function/method into the tests directory.
  • Commit & Push !