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 🙏

© 2026 – Pkg Stats / Ryan Hefner

fileside

v0.1.2

Published

Application to retrieve file size, and produce a file hash.

Readme

fileside Logo

Try fileside on RunKit Build Status

A NodeJS library designed to process local file size strings and hash a file. As of now fileside can only process local files but look to expand to additional features such as drag and drop support.

This Node.JS moduke analyzes a local file and returns the following information:

  • Filesize in kilobytes
  • Filesize in Bytes
  • Hash using md5, sha1, sha256, sha512

Getting Started

The following demonstrates different uses of fileside's functions and instructions to get you setup for development and testing.

Examples

var fileside = require("fileside");
var testFile = "./test/test_file.txt";

fileside.handleFile(testFile);

fileside.getFileKb(testFile, function(err, result) {
  console.log(result); //0.04 Kilobytes
});

fileside.getFileBytes(testFile, function(err, result) {
  console.log(result);
}); //43 Bytes

fileside.fileHash(testFile, "md5", function(err, result) {
  console.log("md5: " + result);
}); //md5:  9e107d9d372bb6826bd81d3542a419d6

fileside.fileHash(testFile, "sha1", function(err, result) {
  console.log("sha1: " + result);
}); //sha1:  2fd4e1c67a2d28fced849ee1bb76e7391b93eb12

fileside.fileHash(testFile, "sha256", function(err, result) {
  console.log("sha256: " + result);
}); //sha256:  d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592

fileside.fileHash(testFile, "sha512", function(err, result) {
  console.log("sha512: " + result); 
}); //07e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb642e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6

Prerequisites

  • node v8.9 and up
  • npm 5.5 and up

Moodule Install

  1. npm install fileside

Dev-Install

Setup fileside on your local machine

  1. git clone https://github.com/marcobeltempo/fileside
  2. cd fileside
  3. npm install
  4. npm run start:dev //(optional) This will load a test server to view the results of a test .txt file
  5. Navigate to http://localhost:3000/ to view the results

Running the Test Suite

  • npm start:dev - launches a loalhost server and analayze and display the results of test_file.txt
  • npm test - performs an eslint + prettier and jest tests
  • npm run test:lint:fix - automatically fix any styling and validation errors. (Double check your changes)

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Marco Beltempo - Initial work - fileside

See the list of contributors who have participated in this project.

License

This project is licensed under the BSD 2-Clause License - see the LICENSE.md file for details

Social

Web Icon GitHub Icon Twitter Icon LinkedIn Icon Email Icon