mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
8 lines
243 B
JavaScript
8 lines
243 B
JavaScript
/** Runs both in Node.js and browser (without path module).
|
|
* Paths are case-sensitive.
|
|
*/
|
|
module.exports.getId = (root, entry) => {
|
|
const relative = entry.replace(root, '').replace(/\\/g, '/')
|
|
return relative.replace(/\/[^\/]+$/, '')
|
|
}
|