Comparing version 0.0.7 to 0.0.8
@@ -6,3 +6,3 @@ import {pane} from './pane.js'; | ||
// http://james.padolsey.com/javascript/wordwrap-for-javascript/ | ||
function wordwrap(str, width = 80, maxLines = Infinity) { | ||
function wordwrap(str, width, maxLines) { | ||
const regex = RegExp('.{0,' +width+ '}(\\s|$)|.{' +width+ '}|.+$', 'g'); | ||
@@ -14,3 +14,3 @@ let lines = str.match(regex).slice(0, maxLines); | ||
export function letters(font, str, maxCols=Infinity, maxRows=Infinity) { | ||
export function letters(font, str, maxCols=10000, maxRows=10000) { | ||
const lines = wordwrap(str, maxCols, maxRows); | ||
@@ -17,0 +17,0 @@ |
{ | ||
"name": "pxcan", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "ESM-ready pixel library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
27845