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 🙏

© 2025 – Pkg Stats / Ryan Hefner

linear-feet

v1.0.6

Published

A simple package for calculating linear feet

Downloads

196

Readme

Linear Feet

Linear Feet is a simple NPM package written in typescript for calculating the linear feet of a skid or set of skids, as commonly used in United States LTL (Less than Truck Load) shipping. It doesn't attempt to do any bin packing, because you don't do bin packing when calculating linear feet. Just simple linear feet.

Installing

npm add linear-feet

Examples:

import {calculate, Skid} from "linear-feet";

const mySkids = {
    length: 45, //45 inches long
    width: 20, //45 inches wide
    height: 45, //45 inches tall
    quantity: 3, //3 skids match these dimensions
    stackable: false //This skid cannot be stacked.
};

 //Prints 2.8125 linear feet
console.log(calculate(mySkids) + " linear feet");

//There's also a handy class for creating skids!
const myOtherSkid = new Skid(1, 60, 45, 45, false);

//The calculate method also accepts an array of skids
//These skids combine for 5.3125 linear feet
let myArray = [mySkids, myOtherSkid];
console.log(`All skids total ${calculate(myArray)} linear feet`); 

//The options object allows you to modify 
//how the linear feet are calculated
const lft = calculate(mySkids, {maxSkidsAcross: 3});

If you're using typescript, you can also use the iLftOptions and iSkid interfaces:

import {calculate, iLftOptions, iSkid} from "linear-feet";

const mySkids: iSkid = {
    quantity: 3,
    length: 45,
    width: 20,
    height: 45, 
    stackable: false 
};

const shippingOptions: iLftOptions = { maxSkidsAcross: 3 };

console.log(calculate(mySkids, shippingOptions)); 

Linear Foot Options

The options object has the follow properites:

maxStackableLength: Skids greater than this length will never be considered stackable. Default is 144.

maxStackableHeight: Skids taller than this will never be considered stackable. Default is 48.

maxStackableWidth: Skids wider than this will never be considered stackable. Default is undefined (no limit).

truckWidth: The width in inches of the truck/trailer for the purposes of determining how many items can sit wide. Default is 96.

truckHeight: The height in inches of the truck/trailer for the purposes of determining how high items can be stacked. Default is 106.

maxSkidsAcross: Maximum number of skids that can be placed side-by-side, regardless of truck width. Default is undefined (no limit).

maxSkidsStackable: Maximum number of skids that can be placed on top of each other, regardless of truck height. Default is 2.

Source

Download the source here: https://github.com/Pharylon/LinearFeet.git

It's a typescript project, so if you want to build the source, just run tsc. Then if you want to run tests, it's just npm test. If you want to contribute, just send me a pull request. 😇

License

This project is licensed under the MIT License - see the LICENSE.md file for details

The End

You made it to the end of the ReadMe! Congratulations! 🎉🍰🎈💃