New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

adaptable-text

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adaptable-text - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## [3.0.1](https://github.com/dmnsgn/adaptable-text/compare/v3.0.0...v3.0.1) (2021-04-11)
# 3.0.0 (2021-04-10)

@@ -7,0 +11,0 @@

2

package.json
{
"name": "adaptable-text",
"version": "3.0.0",
"version": "3.0.1",
"description": "Adapt font size to a specified width.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -19,4 +19,2 @@ # adaptable-text

![](https://raw.githubusercontent.com/dmnsgn/adaptable-text/main/screenshot.gif)
## Installation

@@ -31,4 +29,24 @@

```js
import adaptableText from "adaptable-text";
console.log(adaptableText);
import AdaptableText from "adaptable-text";
const textToAdapt = new AdaptableText(document.querySelector(".textToAdapt"), {
step: 0.1,
minFontSize: 10,
width: null,
});
textToAdapt.init();
// Adapt
const adapt = () => {
textToAdapt.setWidth();
textToAdapt.adapt();
};
// Listen for a resize event
window.addEventListener("resize", adapt);
// Kick off
requestIdleCallback(() => {
adapt();
});
```

@@ -35,0 +53,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