0.1.1 • Published 8 years ago

bestfitwidth v0.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

bestfitwidth

Useful for determining best image widths in responsive applications, for node or the browser.

Given a width integer and an array of possible values, like pre-cut image file widths, find the best fit, opting for a larger file over smaller one.

Install

npm install bestfitwidth

Useage

var bestFitWidth = require('bestfitwidth');
console.log(bestFitWidth(500, [320, 600, 900, 1200])))
// 600
0.1.1

8 years ago

0.1.0

9 years ago

0.0.1

9 years ago