
Product
Socket Now Supports pylock.toml Files
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
flowtype-es
Advanced tools
FlowType ES is a rewrite of the awesome FlowType.JS in ES6. It doesn't require jQuery and triggers recalculation on requestAnimationFrame.
npm install flowtype-es
import createFlowtype from "flowtype-es";
const flowtype = createFlowtype(element, options)
Creates and attaches event listeners for automatic recalculation of the font size upon resizing the element
.
element
is a reference to the dom element for which the font size should be calculated automatically.options
lets you customize the calculation of the font size.Returns an object with update()
and destroy()
.
flowtype.update()
Triggers a recalculation of the font size.
flowtype.destroy()
Removes all event listeners and stops the automatic recalculation of the font size upon resizing the element
.
Option | Description | Dtype | Default |
---|---|---|---|
maximum | Max width of the element until the font size is controlled | int | 1200 |
minimum | Min width of the element until the font size is controlled | int | 500 |
maxFont | Max font size ever used | int | 40 |
minFont | Min font size ever used | int | 12 |
fontRatio | Font ratio for determining the font size based on the elements's width | int | 30 |
import createFlowtype from "flowtype-es";
const flowtype = createFlowtype(document.body, {
maximum: 1200,
minimum: 500,
maxFont: 40,
minFont: 12,
fontRatio: 30
});
v1.0.0
v1.1.0
FAQs
No Library version of FlowType.js
The npm package flowtype-es receives a total of 1 weekly downloads. As such, flowtype-es popularity was classified as not popular.
We found that flowtype-es demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.
Research
Security News
Malicious Ruby gems typosquat Fastlane plugins to steal Telegram bot tokens, messages, and files, exploiting demand after Vietnam’s Telegram ban.