Translates a stream into a C-header char array.
npm install stream-to-c-header-char-arrayInstall locally for using the Javascript API or the CLI in npm scripts:
```
npm install stream-to-c-header-char-array
Or globally to run the CLI from anywhere:
``
npm install -g stream-to-c-header-char-array
Usage: stream-to-c-header-char-array [options] Options:
-h, --help output usage information
-V, --version output the version number
`Example of using the CLI:
`
echo ABCDEFG | stream-to-c-header-char-array alphabet > alphabet.h
`or using the Node.js module:
`Javascript
var transformToCharArray = require('stream-to-c-header-char-array');fs.createReadStream('script.js').pipe(transformToCharArray('scriptString')).pipe(fs.createWriteStream('scriptString.h'));
`Why?
I wanted to embed some javascript into a C program. xxd` can do this on Linux but I needed a cross-platform solution.Written in 2016 by Jesper Oskarsson jesosk@gmail.com
To the extent possible under law, the author(s) have dedicated all copyright
and related and neighboring rights to this software to the public domain worldwide.
This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software.
If not, see