https://github.com/web-packages/web_utility
This package provides additional Util features for the Web standard API.
https://github.com/web-packages/web_utility
font-end utils web
Last synced: 5 months ago
JSON representation
This package provides additional Util features for the Web standard API.
- Host: GitHub
- URL: https://github.com/web-packages/web_utility
- Owner: web-packages
- License: mit
- Created: 2024-09-10T00:52:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-07T02:47:48.000Z (over 1 year ago)
- Last Synced: 2024-11-07T03:31:06.392Z (over 1 year ago)
- Topics: font-end, utils, web
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@web-package/utility
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Web Utility
Version
v1.2.20
# Introduction
This package provides additional Util features for the Web standard API.
> See Also, If you want the change-log by version for this package. refer to [Change Log](CHANGELOG.md) for details.
# Usage
```ts
import { ElementUtil, DOMRectUtil } from "@web-package/utility";
// Gets the intrinsic size(i.e. width, height) of a given element.
ElementUtil.intrinsicSizeOf(target);
// Gets the intrinsic size and DOMRect values of a given element.
DOMRectUtil.intrinsicOf(target);
// Gets the intrinsic size(i.e. width, height) of an element by getter calling.
const size = target.intrinsicSize;
// Gets the intrinsic size and DOMRect values of an element by getter calling.
const rect = target.intrinsicRect;
// Gets the intrinsic width of an element by getter calling.
const width = target.intrinsicWidth;
// Gets the intrinsic height of an element by getter calling.
const height = target.intrinsicHeight;
```