Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wiwichips/winj
https://github.com/wiwichips/winj
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wiwichips/winj
- Owner: wiwichips
- Created: 2021-05-07T20:47:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-13T00:05:54.000Z (about 3 years ago)
- Last Synced: 2024-10-20T02:33:01.652Z (18 days ago)
- Language: JavaScript
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# winj
Will Inject
* this is used for embedding file binaries into functions specifically for dcp apps
* injects a file into a workfunction as a string of bytes
* very hacky solution I use for personal projectsExample:
```javascript
const winj = require('winj);function workFunction () {
// ...
const bin = WINJ_EMBED_FILE_AS_BIN('./yourFileOnYourMachine');
// ...
}const workFunctionAsAString = await winj.embedFileAsBinary(workFunction);
// ...
const job = compute.for(data, workFuntionAsAString);
const results = job.exec();
```TODO
* make this into a more proper node module
* store the binary somewhere in case multiple calls are made to it