Browse Source

feat(hash-file): update subject

Add information on how to export the required function
pull/1878/head
nprimo 2 years ago committed by Niccolò Primo
parent
commit
b4a84dc28e
  1. 6
      subjects/blockchain/hash-file/README.md

6
subjects/blockchain/hash-file/README.md

@ -4,6 +4,12 @@
Create a function `hashFile(fpath)` that given the name of a file in the current folder, expected to be a string, returns the hash `sha256` of the content of this file as a string.
Here an example on how you should make your function used from external scripts:
```js
exports.hasFile = ...
```
### Usage
Here below an example of `main.js` script to test the usage of the `hashFile` function:

Loading…
Cancel
Save