Completed
Push — master ( 06507b...6aec3d )
by Felipe
01:55
created

src/icon_object.js   A

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 17
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 0
eloc 11
nc 2
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 3
mnd 0
bc 3
fnc 3
bpm 1
cpm 1
noi 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A IconObject.toJSON 0 5 1
A icon_object.js ➔ IconObject 0 7 1
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