string-pixel-width
Advanced tools
Comparing version
{ | ||
"name": "string-pixel-width", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "String pixel width measurement on the backend in Javascript", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,3 +9,3 @@ [string-pixel-width](https://github.com/adambisek/string-pixel-width) | ||
Read more about purpose - http://TOOD | ||
Why I created this package? Read more about purpose: http://TOOD | ||
@@ -15,2 +15,3 @@ Installation | ||
To install the stable version: | ||
<code> | ||
@@ -22,2 +23,9 @@ npm install --save string-pixel-width | ||
------------ | ||
embed jako v jestu | ||
``` | ||
var pixelWidth = require('string-pixel-width'); | ||
const width = pixelWidth('My text ...', { size: 10 }); | ||
console.log('This text is ' + width + 'px long in the size of 10px.'); | ||
// This text is 43.5px long in the size of 10px. | ||
``` |
58168
0.42%29
38.1%