diff options
Diffstat (limited to 'lib/image.js')
| -rw-r--r-- | lib/image.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/image.js b/lib/image.js index b25b5895..426ce78f 100644 --- a/lib/image.js +++ b/lib/image.js @@ -1,10 +1,15 @@ /** * * @namespace faker.image + * @property {object} lorempixel - faker.image.lorempixel + * @property {object} unsplash - faker.image.unsplash + * @default Default provider is unsplash image provider */ var Image = function (faker) { var self = this; + var Lorempixel = require('./image_providers/lorempixel'); + var Unsplash = require('./image_providers/unsplash'); /** * image @@ -210,6 +215,13 @@ var Image = function (faker) { var rawPrefix = 'data:image/svg+xml;charset=UTF-8,'; return rawPrefix + encodeURIComponent(svgString); }; + + self.lorempixel = new Lorempixel(faker); + self.unsplash = new Unsplash(faker); + + // Object.assign(self, self.unsplash); + // How to set default as unsplash? should be image.default? } -module["exports"] = Image; + +module["exports"] = Image;
\ No newline at end of file |
