项目原始demo,不改动
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
Este repositorio está archivado. Puede ver los archivos y clonarlo, pero no puede subir cambios o reportar incidencias ni pedir Pull Requests.

123456789101112131415161718192021222324252627
  1. # to-arraybuffer [![Build Status](https://travis-ci.org/jhiesey/to-arraybuffer.svg?branch=master)](https://travis-ci.org/jhiesey/to-arraybuffer)
  2. [![Sauce Test Status](https://saucelabs.com/browser-matrix/to-arraybuffer.svg)](https://saucelabs.com/u/to-arraybuffer)
  3. Convert from a Buffer to an ArrayBuffer as fast as possible.
  4. Note that in some cases the returned ArrayBuffer is backed by the same memory as the original
  5. Buffer (but in other cases it is a copy), so **modifying the ArrayBuffer is not recommended**.
  6. This module is designed to work both in node.js and in all browsers with ArrayBuffer support
  7. when using [the Buffer implementation provided by Browserify](https://www.npmjs.com/package/buffer).
  8. ## Usage
  9. ``` js
  10. var toArrayBuffer = require('to-arraybuffer')
  11. var buffer = new Buffer(100)
  12. // Fill the buffer with some data
  13. var ab = toArrayBuffer(buffer)
  14. // `ab` now contains the same data as `buffer`
  15. ```
  16. ## License
  17. MIT