Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fit-box

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fit-box - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

26

package.json
{
"name": "fit-box",
"version": "1.0.0",
"version": "1.0.1",
"description": "Fits a box within a boundary while keeping its original aspect ratio",
"keywords": [
"geometry",
"rectangles",
"boxes",
"fit"
],
"repository": {
"type": "git",
"url": "https://github.com/christianhg/fit-box.git"
},
"author": "Christian Hamburger Grøngaard <christianhg@gmail.com>",
"license": "MIT",
"homepage": "https://github.com/christianhg/fit-box",
"bugs": "https://github.com/christianhg/fit-box/issues",
"main": "dist/index.js",

@@ -12,10 +27,10 @@ "module": "dist/fit-box.esm.js",

"dev": "tsdx watch",
"dist": "trash dist && npm run prettier-production && npm run test-coverage && tsdx build",
"test": "tsdx test",
"dist": "trash dist && npm run prettier-production && npm run test && tsdx build",
"test": "trash coverage && tsdx test --coverage",
"test-watch": "tsdx test --watchAll",
"test-coverage": "trash coverage && tsdx test --coverage",
"lint": "tsdx lint",
"prettier": "prettier --write \"{**/*,*}.{md,ts}\"",
"prettier-production": "prettier --list-different \"{**/*,*}.{md,ts}\"",
"prettier-staged": "pretty-quick --staged --pattern \"{**/*,*}.{md,ts}\""
"prettier-staged": "pretty-quick --staged --pattern \"{**/*,*}.{md,ts}\"",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},

@@ -36,2 +51,3 @@ "peerDependencies": {},

"@types/jest": "^24.0.18",
"coveralls": "^3.0.6",
"husky": "^3.0.4",

@@ -38,0 +54,0 @@ "prettier": "^1.18.2",

@@ -5,5 +5,19 @@ # Fit Box

[![npm module](https://badge.fury.io/js/fit-box.svg)](https://www.npmjs.org/package/fit-box)
[![Coverage Status](https://coveralls.io/repos/github/christianhg/fit-box/badge.svg?branch=master)](https://coveralls.io/github/christianhg/fit-box?branch=master)
[![Build Status](https://travis-ci.org/christianhg/fit-box.svg?branch=master)](https://travis-ci.org/christianhg/fit-box)
[![Dependencies](https://david-dm.org/christianhg/fit-box.svg)](https://david-dm.org/christianhg/fit-box)
[![devDependencies Status](https://david-dm.org/christianhg/fit-box/dev-status.svg)](https://david-dm.org/christianhg/fit-box?type=dev)
The box will either be scaled up or scaled down within the boundary:
```js
fitBox({
boundary: { width: 400, height: 300 },
box: { width: 20, height: 60 },
});
// => { width: 100, height: 300 }
fitBox({
boundary: { width: 400, height: 300 },
box: { width: 1280, height: 760 },

@@ -10,0 +24,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc