{"_id":"@atayahmet/blobify","_rev":"4-69a447ce68066eca738fb09a7fa98eac","name":"@atayahmet/blobify","dist-tags":{"latest":"1.1.4"},"versions":{"1.0.0":{"name":"@atayahmet/blobify","version":"1.0.0","description":"A Javascript automation tool to convert file to blob object and vice-versa.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"jest --config jestconfig.json","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","lint":"tslint -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/atayahmet/blobify.git"},"keywords":["blob","chunks"],"author":{"name":"Ahmet ATAY"},"license":"MIT","bugs":{"url":"https://github.com/atayahmet/blobify/issues"},"homepage":"https://github.com/atayahmet/blobify#readme","devDependencies":{"@types/jest":"^24.0.9","jest":"^24.3.1","prettier":"^1.16.4","ts-jest":"^24.0.0","tslint":"^5.13.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3333"},"directories":{"lib":"lib"},"dependencies":{},"gitHead":"c60e4495a0f674814663c640f5f96cabd0dd85af","_id":"@atayahmet/blobify@1.0.0","_nodeVersion":"6.11.4","_npmVersion":"6.8.0","dist":{"integrity":"sha512-PTh/PxduhiqmJiXvn/9/+/t4mZ9vJhwfkoVdE0qZO9kkLaaGbtbvq6IyjVpT0ZgRRJJct1ufKUIVToXkB4mjdQ==","shasum":"f7bb43f27dfec21cb59b78e92b477f0e249f1d9d","tarball":"https://registry.npmjs.org/@atayahmet/blobify/-/blobify-1.0.0.tgz","fileCount":9,"unpackedSize":15598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgoKNCRA9TVsSAnZWagAA8agP/0RWlnqaKzthtIbrW8vu\nmo3BoJabSsmqnrn+keBSB9/R7a9jcum/mbY6RL+Sn61uMAOCYFVm12hb6Mbp\n9KEAnaazy1vFAREsd7JpYcHh6WIaZV/B7zQlpt9pXi+H4kGn/XVHoL4zL0A9\nW1OIw/6VMXjsJhewsuBlbKtdO6CxTDq5PiXLOJHnea+ZYlq5kUte6VH64Yxi\nj7neLSzpj9QdlZyXTCvJB+ifzabsylX1XFgLmOO8jl2dK7UgZk0ZktByF4rC\nwGIZLTn2vYtKPzGOUI51PnMKqeQK7BbU4eTdsKKGVseRSY0zzXmgWbkSHQVa\nDuwLtlw18xjkIV8ScjIl8MPkJ2da23ziDy6ihkiPQ/ersiJZ6UN6fW7h6B/5\n/0b+7egxdZwHszZM12PXdLAy6jgwRBWblos37Cx+qfR6hJeop2mHe0ALT8yG\n3VI8as5nX6Q8Out5Ul1ZNRHj9st12yKzt9Rl9muD9VVNA4o8NoAostHPYCMi\n3gJkIBL7JWSW8bvVfqEB70ZXs2JqFWDwjkik9I5NB4Lx9oG6r2torxUhgS4J\nfLUoPB8ATC5C4ShDB5gTA4w/ocUyrNyku8N4IRprd+V1op+6/3vaMm3ZRNer\nvpF+jhKowwz0DunzYztsl2OBBJfQo34ULVYYKzjRZwB7J3QHoEp48AV+XM9y\nuVqO\r\n=HGCy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAsNCi3ePF8gqVQryqxHqAzACvUqqOAP/JoN2nQLBa8TAiAdkyJyXOHxvg0je/34mHnmtLuXN38lYRYpP+wTmeSUdQ=="}]},"maintainers":[{"name":"atayahmet","email":"ahmet.atay@hotmail.com"}],"_npmUser":{"name":"atayahmet","email":"ahmet.atay@hotmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blobify_1.0.0_1552056973047_0.5525546306553175"},"_hasShrinkwrap":false},"1.1.1":{"name":"@atayahmet/blobify","version":"1.1.1","description":"A Javascript automation tool to convert file to blob object and vice-versa.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"cross-env NODE_ENV=test && jest --config jestconfig.json --no-cache","coverage":"nyc report --reporter=text-lcov | coveralls","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","lint":"tslint -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/atayahmet/blobify.git"},"keywords":["blob","chunks","file","images"],"author":{"name":"Ahmet ATAY"},"license":"MIT","bugs":{"url":"https://github.com/atayahmet/blobify/issues"},"homepage":"https://github.com/atayahmet/blobify#readme","devDependencies":{"@types/jest":"^24.0.9","cross-env":"^5.2.0","jest":"^24.3.1","prettier":"^1.16.4","tslint":"^5.13.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3333"},"directories":{"lib":"lib"},"dependencies":{},"gitHead":"f119d821718e04bb10f30f4a484c2186e34a4f79","_id":"@atayahmet/blobify@1.1.1","_nodeVersion":"8.9.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-PRblUWLVoqu3R8KkbbdEloXoeKh8AaVRFI/lOhyMuZLjCfd4BPB1hcnR0To3TlWYR6zoqsheYbGLRK8HCdXumg==","shasum":"5e58ff646da156cb6c2f6dc721c34690e28453d0","tarball":"https://registry.npmjs.org/@atayahmet/blobify/-/blobify-1.1.1.tgz","fileCount":7,"unpackedSize":16870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclpCgCRA9TVsSAnZWagAAy5YP/ijQbkmi1HYbOmRadhG/\nZtdZeBPHrecTl0XynI8A5FuA7U3tvqYh4CS113TQC/EfcHjA4fxrNZqwkehG\nBvOhN69KNxLuXFlQjvEBtAaCL8Yl8pGljteqhnJdAcTZ4oAGuUXY05IfLmdw\nHWHNIAty+LXL9xjPbkv3ArLdrT1Fttg7QTDugm7+cRHStdwQ4L5Wg20IojGu\nQL7cyqOmuGHQjTxIzFCkkJxQz2LGEdAmj3iejODhyi6stFumD3/U5csY1T8D\nNHVRvUMqx3DR9tG0FnOPtt7Z6Hvm5H8xoMWRtaIk7yTg/Dasml+GZy7Gkr4r\neheqm7zNP1jGsUa+VZ9jY+Qs/LcNjTAmJSkFu3QIcNkyxL+5RN/h7nImks2A\nmnaLH74NYKDnbba3hu6EMQLH44tok/KBlrjvYv/vq/sqz8xSmB3667kictmL\nd0ma0NtGJiqWN4br7sUfO4gdA6iR4NzEhWkaEJAmEw/gNkv8t4wbXjVA7fgA\nTSBCVFXJ1laRQGCH3aekjAUTnMcOq0YDBjG8ZS72LaRs2+xTiWBQAkcWs+ve\n3uF8FRAyzJPv2Mn+5hWSE9Z7UmCHdE6v/5ujk+89nKnCf50PaI4ZaGlCZd6f\njc5ILS5dakK02i7RJPXryX+d0TgwXXHUaAts4bhvCaBQTt4gVLMKhO6wFEdG\ngp0Y\r\n=Sesw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRBqeOiCUL9YLcC0SrlD/eJwGucMrft5w5P6h5DENeCwIhAJpOv0R914DHECb9pgNgkvoSKxzCbYbhRGuD8pthUgor"}]},"maintainers":[{"name":"atayahmet","email":"ahmet.atay@hotmail.com"}],"_npmUser":{"name":"atayahmet","email":"ahmet.atay@hotmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blobify_1.1.1_1553371295827_0.8166286203257604"},"_hasShrinkwrap":false},"1.1.2":{"name":"@atayahmet/blobify","version":"1.1.2","description":"A Javascript automation tool to convert file to blob object and vice-versa.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"cross-env NODE_ENV=test && jest --config jestconfig.json --no-cache","coverage":"nyc report --reporter=text-lcov | coveralls","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","lint":"tslint -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/atayahmet/blobify.git"},"keywords":["blob","chunks","file","images"],"author":{"name":"Ahmet ATAY"},"license":"MIT","bugs":{"url":"https://github.com/atayahmet/blobify/issues"},"homepage":"https://github.com/atayahmet/blobify#readme","devDependencies":{"@types/jest":"^24.0.9","cross-env":"^5.2.0","jest":"^24.3.1","prettier":"^1.16.4","ts-jest":"^24.0.0","tslint":"^5.13.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3333"},"directories":{"lib":"lib"},"dependencies":{},"gitHead":"182a200412510183352cb6481a1b765b1753974e","_id":"@atayahmet/blobify@1.1.2","_nodeVersion":"8.9.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-cqP9ZJIKdBku/qVH2sLBbuW1f9+pgu1lD7IEt4zWmU7AH/MIm4vy4WUIPzWtfA7T4gEPAEtX+tBthPhwo9ptdA==","shasum":"5d1e8a9e1af7a067968347d612e7d1efc941a128","tarball":"https://registry.npmjs.org/@atayahmet/blobify/-/blobify-1.1.2.tgz","fileCount":7,"unpackedSize":16896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclpLXCRA9TVsSAnZWagAAfkEP/AnpgvoMJj6Np//ME1gc\nzHSplMDqLIokXrD9MWyUGDEhBoei61kFon+z0Yb0ymU6eUaXEy2ru9e5AqXb\n5Tjff8Rq50GCGud+2PtaJEthwVRpzeG5KN/Jis+YHy1MXGsr9UeumyA697GV\nucXl4hhpbCt/OvFrAa2y0sMg47SfImjKdDhBPoSytX2xDwySNgg273dexRhT\nmGoHhpkMk34Sh31o8lM5UYrHLsmrwRPtQbEjUBNjnJUduipoYJdaR5NGkjlg\nmg+un0clDpCwn17QkAvQRrzQ3io+Y1uRZ4UDjeLI0EWx3zxMh3X9qhwB/7Zv\ntZ1NMRSY9tUxfdmlxrzfLGRb51B9tGXlnGPYlwHP7NFpt8V/ML3W/tZmEBKG\nske38oRXXdWKkDh0buCnTSSCl9bGGqkep4futZ4m4Fc3SZ/rSGxDn1Qevrkq\njHeuwI/gs8hB+E44uubtPPWZtONbyKa99tgWhfcPw52cxl8B6IRp/B7rZ66V\nMlvIcIBZydOUW0SkoD14G7Ga6WXTEqpUB4SY+Gv3fCCbYBN3imae2X5GN4/k\nemTcq4hypGcODPfbAoW48RRAtYiyjwQNQh9Lb0DfpTjsRjn686jEnkqWQGmJ\nm0J9PPSpo1bBwUJhQKgosVArYhSBhE08WmPAB2NMn/Ysv6NPB60wVBCR2VDB\nBtcP\r\n=0Mpc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1hBw7ibIPCij3zcWJxBojeYsZR/F48OzWHuv/YieVdgIgE/7BFoRJHbQItEQiToRq4rzneCOHdAqJ6jvNF0ml4FU="}]},"maintainers":[{"name":"atayahmet","email":"ahmet.atay@hotmail.com"}],"_npmUser":{"name":"atayahmet","email":"ahmet.atay@hotmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blobify_1.1.2_1553371862515_0.5476318641307956"},"_hasShrinkwrap":false},"1.1.4":{"name":"@atayahmet/blobify","version":"1.1.4","description":"A Javascript automation tool to convert file to blob object and vice-versa.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"cross-env NODE_ENV=test && jest --config jestconfig.json --no-cache","coverage":"nyc report --reporter=text-lcov | coveralls","build":"tsc","format":"prettier --write \"src/**/*.ts\" \"src/**/*.js\"","lint":"tslint -p tsconfig.json","prepare":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run format && git add -A src","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/atayahmet/blobify.git"},"keywords":["blob","chunks","file","images"],"author":{"name":"Ahmet ATAY"},"license":"MIT","bugs":{"url":"https://github.com/atayahmet/blobify/issues"},"homepage":"https://github.com/atayahmet/blobify#readme","devDependencies":{"@types/jest":"^24.0.9","cross-env":"^5.2.0","jest":"^24.3.1","prettier":"^1.16.4","ts-jest":"^24.0.0","tslint":"^5.13.1","tslint-config-prettier":"^1.18.0","typescript":"^3.3.3333"},"directories":{"lib":"lib"},"dependencies":{},"gitHead":"30fb2e0a268f80e85d63f98539f8cd6608610d07","_id":"@atayahmet/blobify@1.1.4","_nodeVersion":"8.9.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-hNsUZfSn9VmJMChBEdqKZVnyumpLUdVfp4+XriyPp/WMOrxZadCRV5ABHNQUu8UojvAKukemeIKXuxCUXXXKpQ==","shasum":"aef4554719b9e498d8e42a19506640f7569f43bb","tarball":"https://registry.npmjs.org/@atayahmet/blobify/-/blobify-1.1.4.tgz","fileCount":7,"unpackedSize":16938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmNuJCRA9TVsSAnZWagAA2xsP+QCXh8mWcZ6MamLyCIpp\n4BatwFl0h9Zg7XP6WuvhRiz4scmZbOoopgjvMbP1NiET4lUTiV1G24eBaao6\nNM/fcRuNTjXtic9x2ysIWkQwvmO/D4cNm862E4YKZwFaGE/WoBJiDWzw696y\n7sL4+G481NQ2VpAxMzHr9FgXBT5rcOH3TFVvqfnVE8949uhlQTM6eQJSrlhD\naVW9z3uMeDTi9oRVWjptjYpIUC9y+QsraSdC08ZbPbD8vBKWPfQVWU44wVh/\nMf8E/Ska8+LtSnoBFVT3deRkTEi91vaUQQ1ybCSsJqYVWhmwJyjowxSMHOTT\nZr3FrhDYUVmYVmdpWuytgYXmTDVxqPf+dbExRdg9eGrBT0F0Y1Augyk8Jtyf\nNwc1bU6vaGaUW5B8A1D80ez3akUdPkb/NIzsfXiIwItU1BO/9SG4nJjH6nx5\nW/oxMKAq8So0Obj/dgxsm6KC3DQ2wO/Fo2vNddAc7eoInrbI1XzU2xus7KQl\nkQDbfqRGBwltHP0ccBBsDahzePE7qH8triZipmtMKxcBO/cXvUS9a/nHkdsL\n+CTz8cyIgicyST+bcDuiPiijCXVc+hkHEZgOCxPKwHsaENpNm04Fy7ctSG+I\nUissSFeJpgWqoJ44w17tBD/s140k8VgdbTmyymqfNPmIfnpsgpV5pTCGmhD5\nL2vE\r\n=oVc3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICI94jUx6pBEDTD5vGj521OIZFr3fw8LYvpWuioGoSWQAiB6KuG91MqT5w4CH1tAzMKIU/d8g1qYORBpa3A/TIBCQQ=="}]},"maintainers":[{"name":"atayahmet","email":"ahmet.atay@hotmail.com"}],"_npmUser":{"name":"atayahmet","email":"ahmet.atay@hotmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/blobify_1.1.4_1553521545101_0.07574741206557212"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-08T14:56:12.867Z","1.0.0":"2019-03-08T14:56:13.166Z","modified":"2022-04-04T16:02:43.879Z","1.1.1":"2019-03-23T20:01:35.910Z","1.1.2":"2019-03-23T20:11:02.643Z","1.1.4":"2019-03-25T13:45:45.283Z"},"maintainers":[{"name":"atayahmet","email":"ahmet.atay@hotmail.com"}],"description":"A Javascript automation tool to convert file to blob object and vice-versa.","homepage":"https://github.com/atayahmet/blobify#readme","keywords":["blob","chunks","file","images"],"repository":{"type":"git","url":"git+https://github.com/atayahmet/blobify.git"},"author":{"name":"Ahmet ATAY"},"bugs":{"url":"https://github.com/atayahmet/blobify/issues"},"license":"MIT","readme":"# Blobify\nA Javascript automation tool to convert from html file object to blob object and more capabilities with creating custom helper function.\n\n[![npm version](https://badge.fury.io/js/%40atayahmet%2Fblobify.svg)](https://badge.fury.io/js/%40atayahmet%2Fblobify)\n[![Build Status](https://travis-ci.org/atayahmet/blobify.svg?branch=master)](https://travis-ci.org/atayahmet/blobify.svg?branch=master)\n[![Dependency Status](https://img.shields.io/david/atayahmet/storage-based-queue.svg?style=flat-square)](https://david-dm.org/atayahmet/storage-based-queue)\n[![Known Vulnerabilities](https://snyk.io/test/github/atayahmet/blobify/badge.svg?targetFile=package.json)](https://snyk.io/test/github/atayahmet/blobify?targetFile=package.json)\n[![GitHub license](https://img.shields.io/github/license/atayahmet/storage-based-queue.svg)](https://github.com/atayahmet/blobify/blob/master/LICENSE)\n[![GitHub issues](https://img.shields.io/github/issues/atayahmet/storage-based-queue.svg)](https://github.com/atayahmet/blobify/issues)\n\n## Getting Started\n\n```ts\nimport { chunk } from '@atayahmet/blobify';\n\nchunk({ chars: stream, slice: 128, type: 'image/jpg' })\n```\n\n### Installing\n\n```sh\nnpm i @atayahmet/blobify --save\n```\nor\n\n```sh\nyarn add @atayahmet/blobify\n```\n\n## Running the tests\n\n```ts\nnpm test\n```\n\n### Built-in Helpers\n\n| Name         | Parameter Type | Return                 | Description                             |\n|--------------|----------------|------------------------|-----------------------------------------|\n| pipe         | Function       | Blobify class instance | Pipe itarator.                          |\n| createBlob   | string[]       | Blob                   | Create blob object from chunks.         |\n| chunk        | IChunkOptions  | Uint8Array[]           | Chunk generator.                        |\n| base64Encode | File           | Promise&lt;string&gt;  | HTML5 File object.                      |\n| base64Decode | string         | any                    | Base64 encoded data.                    |\n| toStream     | Blob           | Promise&lt;string&gt;  | Convert blob object to readable content.|\n\n### IChunkOptions\n\n| Name   | Type                 | Description                   |\n|--------|----------------------|-------------------------------|\n| chunks | string or Uint8Array | Data format.                  |\n| slice  | number (optional)    | Per chunk size. (Default 512) |\n| type   | string               | File content type.            |\n\n## Quick Example\n\nConvert the file to uploadable form.\n\n```ts\nimport { pipe, chunk, createBlob, base64Encode } from '@atayahmet/blobify';\n\nconst file = document.getElementById('image');\n\npipe(() => base64Encode(file))\n  .pipe(stream => chunk({ chars: stream, slice: 128 }))\n  .pipe(chunks => createBlob(chunks, \"image/jpeg\"))\n  .catch(console.error)\n  .run()\n  .then(resul => {\n    console.log(result);\n  });\n```\n\nVice versa:\n\n```ts\npipe(() => toStream(blob))\n  .pipe(stream => base64Decode(stream))\n  .pipe(data => {\n      // do some maniplation...\n      return data;\n  })\n  .run()\n  .then(result => {\n    // ...\n  });\n```\n\n## Built With\n\n* [TypeScript](https://www.typescriptlang.org) \n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags). \n\n## Authors\n\n* [**Ahmet ATAY**](https://github.com/atayahmet) - *Initial work*\n\nSee also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details","readmeFilename":"README.md"}