Skip to content

Commit 9b66f79

Browse files
committed
Though mapping is not really needed added a getAll() function for compatibility.
1 parent 29138ce commit 9b66f79

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

js/load-image-xmp-map.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
;(function (factory) {
2+
'use strict'
3+
if (typeof define === 'function' && define.amd) {
4+
// Register as an anonymous AMD module:
5+
define(['./load-image', './load-image-exif'], factory)
6+
} else if (typeof module === 'object' && module.exports) {
7+
factory(require('./load-image'), require('./load-image-exif'))
8+
} else {
9+
// Browser globals:
10+
factory(window.loadImage)
11+
}
12+
}(function (loadImage) {
13+
'use strict'
14+
15+
loadImage.XmpMap.prototype.getAll = function () {
16+
var map = {};
17+
var prop;
18+
var id;
19+
for (prop in this) {
20+
if (this.hasOwnProperty(prop)) {
21+
map[prop] = this[prop];
22+
}
23+
}
24+
return map;
25+
};
26+
27+
}));

0 commit comments

Comments
 (0)