UNPKG
bm_scaffold_async_router_test1
Version:
latest (0.1.5)
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
本木前端脚手架-异步路由版-测试专用
bm_scaffold_async_router_test1
/
utils
/
vue-loader
/
lib
/
gen-id.js
9 lines
(7 loc)
•
246 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
// utility for generating a uid for each component file
// used in scoped CSS rewriting
var
hash = require(
'hash-sum'
)
var
cache = Object.create(
null
) module.exports =
function
genId
(
file
)
{
return
cache[
file
] || (cache[
file
] = hash(
file
)) }