Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 17 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { omit } from "./helpers.js"; |
||
2 | |||
3 | function IconObject(canvas, markerOpts) { |
||
4 | this.url = canvas.toDataURL(); |
||
5 | this.fillColor = canvas.fillColor; |
||
6 | this.markerOpts = markerOpts; |
||
7 | Object.assign(this, markerOpts); |
||
8 | return this; |
||
9 | } |
||
10 | |||
11 | IconObject.prototype.toJSON = function() { |
||
12 | return omit(this.markerOpts, function(prop) { |
||
13 | return prop.indexOf("gm_") === 0 || prop === "url"; |
||
14 | }); |
||
15 | }; |
||
16 | |||
17 | export { IconObject }; |
||
18 |