{"_id":"@axolo/file-md5-web","_rev":"1-55f870de81e229313ac89f45dbf14c5b","name":"@axolo/file-md5-web","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@axolo/file-md5-web","version":"0.1.0","keywords":["file md5","file md5 frontend","file md5 browser","file md5 webview","file md5 web","file md5 javascript","file md5 js"],"author":{"name":"Yueming Fang"},"license":"MIT","_id":"@axolo/file-md5-web@0.1.0","maintainers":[{"name":"axolo","email":"fangyueming@foxmail.com"}],"homepage":"https://github.com/axolo/file-md5-web#readme","bugs":{"url":"https://github.com/axolo/file-md5-web/issues"},"dist":{"shasum":"a469f1b41496c6826e8457ab52b6cb7683e0cf7d","tarball":"https://registry.npmjs.org/@axolo/file-md5-web/-/file-md5-web-0.1.0.tgz","fileCount":5,"integrity":"sha512-ECxsLMXGmC6J+7NAF4gfzVbxkiIzYgSBKfxp1dm8rrQkTRqAPw2DT00dWTjhrXStHlF+y7QprP0bhbOB1LvTbQ==","signatures":[{"sig":"MEUCIGX2Ldjh6+5jTcEZ/skvAAd+gHNoUDwBA9IE2VimgfJWAiEAhnitXBghQvAIu7gAtQ9j+cTr62WP5BvT7VfZjb4lk+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25025},"main":"dist/index.js","type":"module","gitHead":"b93e0409382f99956c241a70247a0010bd18ca6f","scripts":{"dev":"vite","build":"vite build","preview":"vite preview","build:npm":"vite build --config npm.config.js"},"_npmUser":{"name":"axolo","email":"fangyueming@foxmail.com"},"repository":{"url":"git+https://github.com/axolo/file-md5-web.git","type":"git"},"_npmVersion":"10.8.2","description":"Get file md5 in web","directories":{},"_nodeVersion":"22.6.0","dependencies":{"spark-md5":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.12","vite":"^5.4.10","@vitejs/plugin-vue":"^5.1.4"},"_npmOperationalInternal":{"tmp":"tmp/file-md5-web_0.1.0_1730459562880_0.6919069366751924","host":"s3://npm-registry-packages"}},"0.1.5":{"name":"@axolo/file-md5-web","version":"0.1.5","description":"Get file md5 in web","author":{"name":"Yueming Fang"},"license":"MIT","type":"module","main":"dist/index.js","scripts":{"dev":"vite","build":"vite build","preview":"vite preview","build:npm":"vite build --config npm.config.js"},"dependencies":{"spark-md5":"^3.0.2"},"devDependencies":{"@vitejs/plugin-vue":"^5.1.4","vite":"^5.4.10","vue":"^3.5.12"},"keywords":["file md5","file md5 frontend","file md5 browser","file md5 webview","file md5 web","file md5 javascript","file md5 js"],"homepage":"https://github.com/axolo/file-md5-web#readme","repository":{"type":"git","url":"git+https://github.com/axolo/file-md5-web.git"},"_id":"@axolo/file-md5-web@0.1.5","gitHead":"a67554e7b843930500382e66fe89146c630c72b5","bugs":{"url":"https://github.com/axolo/file-md5-web/issues"},"_nodeVersion":"22.6.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-DBQa/yn54PDZuQ+g4UGV6/9Zty8InHOAI+Tx6hU4uhrjwME++6JHgpM+ej2DdEnLWE8cjGuiNLzF2YvHX/4GrQ==","shasum":"d84202b1bef387597fc5bcc35564eb505bcc06ec","tarball":"https://registry.npmjs.org/@axolo/file-md5-web/-/file-md5-web-0.1.5.tgz","fileCount":5,"unpackedSize":25315,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBgYkohAdpa9MeHqEiSWhUheMreGc6p5WjwqKW9Q2BbNAiEA7qXLTFp5L71JzbHQT68k7d6+DE8vLXh4HEuvdxsoNPA="}]},"_npmUser":{"name":"axolo","email":"fangyueming@foxmail.com"},"directories":{},"maintainers":[{"name":"axolo","email":"fangyueming@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/file-md5-web_0.1.5_1730715566155_0.4502353169559583"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-01T11:12:42.788Z","modified":"2024-11-04T10:19:26.526Z","0.1.0":"2024-11-01T11:12:43.050Z","0.1.5":"2024-11-04T10:19:26.346Z"},"bugs":{"url":"https://github.com/axolo/file-md5-web/issues"},"author":{"name":"Yueming Fang"},"license":"MIT","homepage":"https://github.com/axolo/file-md5-web#readme","keywords":["file md5","file md5 frontend","file md5 browser","file md5 webview","file md5 web","file md5 javascript","file md5 js"],"repository":{"type":"git","url":"git+https://github.com/axolo/file-md5-web.git"},"description":"Get file md5 in web","maintainers":[{"name":"axolo","email":"fangyueming@foxmail.com"}],"readme":"# file-md5-web\n\nGet file md5 in web browser.\n\n## install\n\n```shell\nnpm i @axolo/file-md5-web\n```\n\n## api\n\n```js\nmd5file(file, config = {})\n```\n\n> params\n\n|        param        |   type   |              description               |\n| ------------------- | -------- | -------------------------------------- |\n| `file`              | [File]   | file to hash                           |\n| `config`            | Object   | config of hash                         |\n| `config.size`       | Number   | file chunk size, default to `20MB`     |\n| `config.raw`        | Boolean  | output as raw , false to `hex`         |\n| `config.onProgress` | Function | callback total chunks and loaded chunk |\n\n> return\n\nresolve md5 of file or reject Error as Promise.\n\n## usage\n\n```js\nimport md5file from '@axolo/file-md5-web'\n\n// <input id=\"file\" type=\"file\">\ndocument.getElementById('file').addEventListener('change', async () => {\n  const md5 = await md5file(this.files[0])\n  console.log(md5)\n})\n```\n\n> Vue CLI\n\nBy default `babel-loader` ignores all files inside `node_modules`.\nYou can enable [transpileDependencies] to avoid unexpected untranspiled code from third-party dependencies.\n\n```js\n// vue.config.js\nmodule.exports = {\n  transpileDependencies: ['@axolo/file-md5-web']\n}\n```\n\n> CommonJS\n\nES Modules is not supported in CommonJS. You can use UMD version.\n\n```js\nconst md5file = require('@axolo/file-md5-web/dist/index.umd.cjs')\nmd5file(file).then(md5 => console.log(md5)) // file from <input type=\"file\">\n```\n\n> Yueming Fang\n> 2024-11-01\n\n[File]: https://developer.mozilla.org/zh-CN/docs/Web/API/File\n","readmeFilename":"README.md"}