Comparing version 0.1.0 to 0.1.1
@@ -11,3 +11,3 @@ import { Vec, dist, add, diff, mult, mag, normalize, rot } from './Vec.js' | ||
constructor(options) { | ||
constructor(options = {}) { | ||
this.options = options | ||
@@ -19,6 +19,7 @@ this.parts = [...borders(), ...patches()] | ||
this.offset = seed | ||
return this | ||
} | ||
icon(templateName) { | ||
let { width = 24, height = 24, stroke = '#000', strokeWidth } = this.options | ||
let { width = 24, height = 24, stroke = '#000', strokeWidth = 1 } = this.options | ||
function requireTags(required, item) { | ||
@@ -25,0 +26,0 @@ if (!required) return true |
export class IconIpsum { | ||
constructor( | ||
options: Partial<{ | ||
options?: Partial<{ | ||
width: number | ||
@@ -10,5 +10,5 @@ height: number | ||
) | ||
seed(seed: number) | ||
icon(templateName: string): string | ||
iconDataUri(templateName: string): string | ||
seed(seed: number): IconIpsum | ||
icon(templateName?: string): string | ||
iconDataUri(templateName?: string): string | ||
} |
{ | ||
"name": "icon-ipsum", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Lorem Ipsum for icons", | ||
@@ -5,0 +5,0 @@ "author": "Daniel Kallin <daniel.kallin@gmail.com>", |
552
19801
13