MCPcopy
hub / github.com/sequelize/sequelize / extractFileNameFromPath

Function extractFileNameFromPath

docs/transforms/menu-groups.js:8–13  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

6const manualGroups = require('./../manual-groups.json');
7
8function extractFileNameFromPath(path) {
9 if (/\.\w+$/.test(path)) {
10 return /([^/]*)\.\w+$/.exec(path)[1];
11 }
12 return /[^/]*$/.exec(path)[0];
13}
14
15const hiddenManualNames = manualGroups.__hidden__.map(extractFileNameFromPath);
16

Callers 1

isLinkToHiddenManualFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected