diff options
| author | Marak <[email protected]> | 2018-10-28 00:06:43 -0400 |
|---|---|---|
| committer | Marak <[email protected]> | 2018-10-28 00:06:43 -0400 |
| commit | acfbf3becde772adf4f6bf63bb1897a37ebddd3a (patch) | |
| tree | a719db3a6f6f601cc49a7479577cf5e7b288aec0 /lib/image.js | |
| parent | 3f7ff55e341447eecc90676ce56681f05d84d7f3 (diff) | |
| parent | 900f3d87cbfd9b86119c4505e3b9dc1e84ea5969 (diff) | |
| download | faker-acfbf3becde772adf4f6bf63bb1897a37ebddd3a.tar.xz faker-acfbf3becde772adf4f6bf63bb1897a37ebddd3a.zip | |
Merge branch 'master' of https://github.com/chinclubi/faker.js
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 |
