(file)
| 12696 | * @return {String|ArrayBuffer|Uint8Array|Buffer} the data. |
| 12697 | */ |
| 12698 | var getBinaryData = function(file) { |
| 12699 | var result = getRawData(file), |
| 12700 | type = utils.getTypeOf(result); |
| 12701 | if (type === "string") { |
| 12702 | if (!file.options.binary) { |
| 12703 | // unicode text ! |
| 12704 | // unicode string => binary string is a painful process, check if we can avoid it. |
| 12705 | if (support.nodebuffer) { |
| 12706 | return nodeBuffer(result, "utf-8"); |
| 12707 | } |
| 12708 | } |
| 12709 | return file.asBinary(); |
| 12710 | } |
| 12711 | return result; |
| 12712 | }; |
| 12713 | |
| 12714 | /** |
| 12715 | * Transform this._data into a string. |
no test coverage detected