npm

@superherocheesecake/size-utils

1.0.10 • Public • Published

SizeUtils

A collecion of reusable methods used when calculating sizes

Cover

import { sizeUtils } from '@superherocheesecake/size-utils';

const s = sizeUtils.cover(containerWidth, containerHeight, elementWidth, elementHeight);

Contain

import { sizeUtils } from '@superherocheesecake/size-utils';

const s = sizeUtils.contain(containerWidth, containerHeight, elementWidth, elementHeight);

Alternative

Unpreferred implementation

import { sizeUtils, SIZE_UTILS_COVER } from '@superherocheesecake/size-utils';

const s = sizeUtils.getSize(containerWidth, containerHeight, elementWidth, elementHeight, SIZE_UTILS_COVER);

Package Sidebar

Install

npm i @superherocheesecake/size-utils

Weekly Downloads

2

Version

1.0.10

License

none

Unpacked Size

8.06 kB

Total Files

12

Last publish

Collaborators

  • n0cha
  • edwardmediamonks
  • wesleysmulders
  • ksawery.mediamonks
  • vandenhork25
  • johanholwerda
  • renedrie
  • kristemmerman123
  • odin.schwartz
  • bolex222
  • coco_g
  • frontend_shcc
  • carinashcc
  • lukasfeitsma
  • jameswhite
  • raul.roman
  • jaak.kivinukk