| 3 | |
| 4 | // use sha1 because it's faster, and collisions extremely unlikely anyway |
| 5 | const pathSafeHash = s => |
| 6 | crypto.createHash('sha1') |
| 7 | .update(s) |
| 8 | .digest('base64') |
| 9 | .replace(/[^a-zA-Z0-9]+/g, '') |
| 10 | .slice(0, 8) |
| 11 | |
| 12 | const retirePath = from => { |
| 13 | const d = dirname(from) |
no test coverage detected