【文件属性】:
文件名称:rev-path:创建修订的文件路径
文件大小:4KB
文件格式:ZIP
更新时间:2021-05-26 08:03:25
JavaScript
旋转路径
创建
安装
$ npm install rev-path
用法
const revPath = require ( 'rev-path' ) ;
const hash = 'bb9d8fe615'
const 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'
有关的
file-获取文件路径
执
【文件预览】:
rev-path-main
----.gitignore(23B)
----.github()
--------workflows()
----.gitattributes(29B)
----package.json(583B)
----readme.md(666B)
----index.js(478B)
----test.js(288B)
----.editorconfig(175B)
----license(1KB)
----.npmrc(19B)