tojsonfile

1.0.2 • Public • Published

tojsonfile

good usage for a big gallery of images.

 
var tojson = require('tojsonfile');
var jsonFile = tojson.toJsonFile;
 
// Both params required
// First param is the location of your images folder!
// Second param is the name for your future json file.
jsonFile.create("images/**/*.jpg",'myJson');
 

JSON file example after creation.

 
[
   {
      "_id":0,
      "path":"images/1173858_1487098008178553_235078334_n.jpg"
   },
   {
      "_id":1,
      "path":"images/1268856_1413192482235773_718278675_o.jpg"
   },
   {
      "_id":2,
      "path":"images/1410791_1427978980757123_634975607_o.jpg"
   }
]
 

/tojsonfile/

    Package Sidebar

    Install

    npm i tojsonfile

    Weekly Downloads

    2

    Version

    1.0.2

    License

    ISC

    Last publish

    Collaborators

    • itayjoseph