Enable the doctests

This commit is contained in:
Pieter Vander Vennet 2023-02-10 14:28:00 +01:00
parent 7cc184fdd8
commit 0b8136a5c4
9 changed files with 10 additions and 8577 deletions

View file

@ -71,16 +71,16 @@ export class ExtractImages extends Conversion<
* ]
* }
* ]
* }, "test").result;
* }, "test").result.map(i => i.path);
* images.length // => 2
* images.findIndex(img => img == "./assets/layers/bike_parking/staple.svg") // => 0
* images.findIndex(img => img == "./assets/layers/bike_parking/bollard.svg") // => 1
* images.findIndex(img => img == "./assets/layers/bike_parking/staple.svg") >= 0 // => true
* images.findIndex(img => img == "./assets/layers/bike_parking/bollard.svg") >= 0 // => true
*
* // should not pickup rotation, should drop color
* const images = new ExtractImages(true, new Map<string, any>()).convert(<any>{"layers": [{mapRendering: [{"location": ["point", "centroid"],"icon": "pin:black",rotation: 180,iconSize: "40,40,center"}]}]
* const images = new ExtractImages(true, new Set<string>()).convert(<any>{"layers": [{mapRendering: [{"location": ["point", "centroid"],"icon": "pin:black",rotation: 180,iconSize: "40,40,center"}]}]
* }, "test").result
* images.length // => 1
* images[0] // => "pin"
* images[0].path // => "pin"
*
*/
convert(