MCPcopy Index your code
hub / github.com/desandro/get-size

github.com/desandro/get-size @v3.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.0 ↗ · + Follow
5 symbols 11 edges 3 files 0 documented · 0% 3 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

getSize

Get the size of elements. Used in Masonry, Isotope, & Flickity.

var size = getSize( elem );
// elem can be an element
var size = getSize( document.querySelector('.selector') )
// elem can be a selector string
var size = getSize('.selector')

Returns an object with:

  • width, height
  • innerWidth, innerHeight
  • outerWidth, outerHeight
  • paddingLeft, paddingTop, paddingRight, paddingBottom
  • marginLeft, marginTop, marginRight, marginBottom
  • borderLeftWidth, borderTopWidth, borderRightWidth, borderBottomWidth
  • isBorderBox

Browser support: Chrome 51+, Firefox 50+, Edge 12+, Safari 10+,

Install

npm: npm install get-size

Yarn: yarn add get-size

MIT License

getSize is released under the MIT License. Have at it.

Core symbols most depended-on inside this repo

getBoxSize
called by 9
test/tests.js
getSize
called by 7
get-size.js
getStyleSize
called by 2
get-size.js
dir
called by 2
tasks/version.js
getZeroSize
called by 1
get-size.js

Shape

Function 5

Languages

TypeScript100%

Modules by API surface

get-size.js3 symbols
test/tests.js1 symbols
tasks/version.js1 symbols

For agents

$ claude mcp add get-size \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact