Socket
Book a DemoInstallSign in
Socket

rev-file

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rev-file

Get the revved file path of a file

latest
Source
npmnpm
Version
4.0.0
Version published
Weekly downloads
1.8K
40.31%
Maintainers
1
Weekly downloads
 
Created
Source

rev-file

Get the revved file path of a file

Reads the file, MD5-hashes it, truncates the hash to 10 characters, appends it to the filename, and returns the modified path.

Install

npm install rev-file

Usage

import {revisionFile} from 'rev-file';

console.log(await revisionFile('src/unicorn.png'));
//=> 'src/unicorn-bb9d8fe615.png'

API

revFile(filepath)

Returns a Promise for a revved file path.

revFileSync(filepath)

Returns a revved file path.

Keywords

rev

FAQs

Package last updated on 11 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts