Snapshot.js was designed to work both in the browser and in Node.js.
To install Snapshot.js on Node.js, open your terminal and run:
npm i @snapshot-labs/snapshot.js
You can create an index.html file and include Snapshot.js with:
<script src="https://cdn.jsdelivr.net/npm/@snapshot-labs/snapshot.js"></script>
npm install
npm run build
# Test default strategy (erc20-balance-of)
npm run test
# Test strategy with name
npm run test --strategy=erc20-received
npm run test --strategy=eth-balance
# Test with more addresses from addresses.json
npm run test --strategy=eth-balance --more=200
MIT.