Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

ac-rev-path

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ac-rev-path

> Create a [revved file path](http://blog.risingstack.com/automatic-cache-busting-for-your-css/)

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

ac-rev-path

Create a revved file path

Install

$ npm install --save ac-rev-path

Usage

var revPath = require('ac-rev-path');
var hash = 'bb9d8fe615'

var path = revPath('src/unicorn.png', hash);
//=> 'src/unicorn-bb9d8fe615.png'

revPath('src/unicorn.png', Date.now());
//=> 'src/unicorn-1432309925925.png'

// you can also revert an already hashed path
revPath.revert(path, hash);
//=> 'src/unicorn.png'

License

MIT © Sindre Sorhus

FAQs

Package last updated on 26 May 2016

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