{"name":"cfb","version":"1.0.7","author":{"name":"sheetjs"},"description":"Compound File Binary File Format extractor","keywords":["cfb","compression","office"],"bin":{"cfb":"./bin/cfb.njs"},"main":"./cfb","types":"types","browser":{"node":false,"process":false,"fs":false},"dependencies":{"commander":"^2.14.1","printj":"~1.1.2"},"devDependencies":{"crc-32":"~1.2.0","mocha":"~2.5.3","blanket":"~1.2.3","@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","@types/commander":"^2.9.0","dtslint":"~0.1.2","typescript":"2.2.0"},"repository":{"type":"git","url":"git://github.com/SheetJS/js-cfb.git"},"scripts":{"pretest":"make init","test":"make test","dtslint":"dtslint types"},"config":{"blanket":{"pattern":"cfb.js"}},"files":["LICENSE","README.md","bin/","dist/","types/index.d.ts","types/tsconfig.json","cfb.js","xlscfb.flow.js"],"homepage":"http://sheetjs.com/opensource","bugs":{"url":"https://github.com/SheetJS/js-cfb/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"gitHead":"c88a98104d77a5bd01339624b27317cbf593f0a0","_id":"cfb@1.0.7","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"sheetjs","email":"dev@sheetjs.com"},"dist":{"integrity":"sha512-KjjZFR+a/e8RDdDTr4PwR0P/HIFRI3sxArFQttml0pFkhIO4TnvS/1+dqtGXPqe5/0MHp2IzjFx1JTzmohHT+w==","shasum":"ccb615eb1bb0a039e7829ab0b2ad4ea564fbaa78","tarball":"http://registry-npm.ywwl.com/cfb/download/cfb-1.0.7.tgz","fileCount":14,"unpackedSize":168112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5Lq7CRA9TVsSAnZWagAA/FsP/iQWXXuOxCiwqqumwNdm\nagPrQYCH1T3YEp23GiwcOwiLMXbopFAlDyuk827d0eeR9M1PxHfOfJ9oQcbX\n0mtgJTprgoxCKRRUkxjPBhRHgCtGjxOZPzHlyWVM2Y6aP4aueBqryMg0Zf0I\ndnX6XH623H9OS4xoCgrqdBYWdl5WSMorUzNO3QTJSVx/l8VmhlIXQ61Nlb+R\npJOp1zgEeBwruaURrv/H3SZjyD9xBjQhs2ZCPfzGmsGTGB3bY/M/zzerC5iq\na7qrMpEHwCQxShb+P4m/t+UEK6gLZZZ9sLuJ5cXmZdcvA3/6tVGvBSLpeBwJ\n4fQjDB/m3/uOP4tzvJ2jeqgmZLvrk7ge0Ygv4/qjlDWz2RqBx+kXX+vW1V0d\n9s1NaqPatVYNvguzLlo7OlN/32iVtW6Ow03DFmP+IHUKuGZVF9sSc5eMhxL5\nHErhdiJHtauwSU+F+et3UiyA+m8Wk/yi+J3r97Rd0dAcJb0tIjS9BPqWNA+H\nZRerIUnbhZRMYnTPe3K/EWJPuHkvrH/YePjjz3Ai1qs868s71rxhxt+CSSTp\ngmwPnxbPlJiU9rUP1u+b+HGLrpNlojz4ZdU+fE3iqg+7FP78ew5+CBzNaymZ\nJOHt7FIc/dwpjfbOQ4ew1A4SIj20Eoo1jfOC0/ZQJoJfZo50M3gZObXKYi9b\nZs5A\r\n=nN6G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXQa/8H9Sg5I4il+sWLThHKhVtHN7UkMfzZ33V20LfMAIgRVjhwuWDFXXxMV8Y6K+A9PovNvCFNJ+o2oHVZKHt1U8="}],"size":50515,"noattachment":false,"key":"/cfb/-/cfb-1.0.7.tgz"},"maintainers":[{"name":"sheetjs","email":"sheetjs@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cfb_1.0.7_1524939450972_0.05214823218277931"},"_hasShrinkwrap":false,"readme":"# Container File Blobs\n\nPure JS implementation of various container file formats, including ZIP and CFB.\n\n[![Build Status](https://travis-ci.org/SheetJS/js-cfb.svg?branch=master)](https://travis-ci.org/SheetJS/js-cfb)\n[![Coverage Status](http://img.shields.io/coveralls/SheetJS/js-cfb/master.svg)](https://coveralls.io/r/SheetJS/js-cfb?branch=master)\n[![Dependencies Status](https://david-dm.org/sheetjs/js-cfb/status.svg)](https://david-dm.org/sheetjs/js-cfb)\n[![NPM Downloads](https://img.shields.io/npm/dt/cfb.svg)](https://npmjs.org/package/cfb)\n[![Analytics](https://ga-beacon.appspot.com/UA-36810333-1/SheetJS/js-cfb?pixel)](https://github.com/SheetJS/js-cfb)\n\n## Installation\n\nIn the browser:\n\n```html\n<script src=\"dist/cfb.min.js\" type=\"text/javascript\"></script>\n```\n\nWith [npm](https://www.npmjs.org/package/cfb):\n\n```bash\n$ npm install cfb\n```\n\nThe `xlscfb.js` file is designed to be embedded in [js-xlsx](http://git.io/xlsx)\n\n\n## Library Usage\n\nIn node:\n\n```js\nvar CFB = require('cfb');\n```\n\nFor example, to get the Workbook content from an Excel 2003 XLS file:\n\n```js\nvar cfb = CFB.read(filename, {type: 'file'});\nvar workbook = CFB.find(cfb, 'Workbook');\nvar data = workbook.content;\n```\n\n\n## Command-Line Utility Usage\n\nThe [`cfb-cli`](https://www.npmjs.com/package/cfb-cli) module ships with a CLI\ntool for manipulating and inspecting supported files.\n\n\n## JS API\n\nTypeScript definitions are maintained in `types/index.d.ts`.\n\nThe CFB object exposes the following methods and properties:\n\n`CFB.parse(blob)` takes a nodejs Buffer or an array of bytes and returns an\nparsed representation of the data.\n\n`CFB.read(blob, opts)` wraps `parse`.\n\n`CFB.find(cfb, path)` performs a case-insensitive match for the path (or file\nname, if there are no slashes) and returns an entry object or null if not found.\n\n`CFB.write(cfb, opts)` generates a file based on the container.\n\n`CFB.writeFile(cfb, filename, opts)` creates a file with the specified name.\n\n### Parse Options\n\n`CFB.read` takes an options argument.  `opts.type` controls the behavior:\n\n| `type`     | expected input                                                  |\n|------------|:----------------------------------------------------------------|\n| `\"base64\"` | string: Base64 encoding of the file                             |\n| `\"binary\"` | string: binary string (byte `n` is `data.charCodeAt(n)`)        |\n| `\"buffer\"` | nodejs Buffer                                                   |\n| `\"file\"`   | string: path of file that will be read (nodejs only)            |\n| (default)  | buffer or array of 8-bit unsigned int (byte `n` is `data[n]`)   |\n\n\n### Write Options\n\n`CFB.write` and `CFB.writeFile` take options argument.\n\n`opts.type` controls the behavior:\n\n| `type`     | output                                                          |\n|------------|:----------------------------------------------------------------|\n| `\"base64\"` | string: Base64 encoding of the file                             |\n| `\"binary\"` | string: binary string (byte `n` is `data.charCodeAt(n)`)        |\n| `\"buffer\"` | nodejs Buffer                                                   |\n| `\"file\"`   | string: path of file that will be created (nodejs only)         |\n| (default)  | buffer if available, array of 8-bit unsigned int otherwise      |\n\n`opts.fileType` controls the output file type:\n\n| `fileType`         | output                  |\n|:-------------------|:------------------------|\n| `'cfb'` (default)  | CFB container           |\n| `'zip'`            | ZIP file                |\n| `'mad'`            | MIME aggregate document |\n\n`opts.compression` enables DEFLATE compression for ZIP file type.\n\n\n## Utility Functions\n\nThe utility functions are available in the `CFB.utils` object.  Functions that\naccept a `name` argument strictly deal with absolute file names:\n\n- `.cfb_new(?opts)` creates a new container object.\n- `.cfb_add(cfb, name, ?content, ?opts)` adds a new file to the `cfb`.\n  Set the option `{unsafe:true}` to skip existence checks (for bulk additions)\n- `.cfb_del(cfb, name)` deletes the specified file\n- `.cfb_mov(cfb, old_name, new_name)` moves the old file to new path and name\n- `.use_zlib(require(\"zlib\"))` loads a nodejs `zlib` instance.\n\nBy default, the library uses a pure JS inflate/deflate implementation.  NodeJS\n`zlib.InflateRaw` exposes the number of bytes read in versions after `8.11.0`.\nIf a supplied `zlib` does not support the required features, a warning will be\ndisplayed in the console and the pure JS fallback will be used.\n\n\n## Container Object Description\n\nThe objects returned by `parse` and `read` have the following properties:\n\n- `.FullPaths` is an array of the names of all of the streams (files) and\n  storages (directories) in the container.  The paths are properly prefixed from\n  the root entry (so the entries are unique)\n\n- `.FileIndex` is an array, in the same order as `.FullPaths`, whose values are\n  objects following the schema:\n\n```typescript\ninterface CFBEntry {\n  name: string; /** Case-sensitive internal name */\n  type: number; /** 1 = dir, 2 = file, 5 = root ; see [MS-CFB] 2.6.1 */\n  content: Buffer | number[] | Uint8Array; /** Raw Content */\n  ct?: Date; /** Creation Time */\n  mt?: Date; /** Modification Time */\n  ctype?: String; /** Content-Type (for MAD) */\n}\n```\n\n\n## License\n\nPlease consult the attached LICENSE file for details.  All rights not explicitly\ngranted by the Apache 2.0 License are reserved by the Original Author.\n\n\n## References\n\n - `MS-CFB`: Compound File Binary File Format\n - ZIP `APPNOTE.TXT`: .ZIP File Format Specification\n - RFC1951: https://www.ietf.org/rfc/rfc1951.txt\n - RFC2045: https://www.ietf.org/rfc/rfc2045.txt\n - RFC2557: https://www.ietf.org/rfc/rfc2557.txt\n\n","publish_time":1524939451065,"_cnpm_publish_time":1524939451065,"dist-tags":{"latest":"1.2.2"}}