This page demonstrates how to use siegfried's wasm build. You can download the latest sf.wasm file from the releases page.
The wasm file attaches an "identify" function into your environment.
Call this function with:
identify(FileSystemHandle, ...options)
The return value is a Promise that resolves to a string value (results formatted in either JSON, YAML, CSV or DROID CSV).
The first argument to identify() must be a FileSystemHandle (file or directory). If you provide a directory, the identify function will walk the directory, and all its subdirectories, recursively, identifying all files within it.
You can add the following additional arguments in any order:
For example:
identify(FSH, "z", "yaml", "sha1")
Format (format):
Hash (hash):
Scan within archives (z): true false