UNPKG

ecstatic

Version:

A simple static file server middleware that works with both Express and Flatiron

10 lines (8 loc) 199 B
'use strict'; module.exports = (stat, weakEtag) => { let etag = `"${[stat.ino, stat.size, JSON.stringify(stat.mtime)].join('-')}"`; if (weakEtag) { etag = `W/${etag}`; } return etag; };