MCPcopy Create free account
hub / github.com/YMFE/yapi / deleteLastObject

Function deleteLastObject

client/components/ModalPostman/VariablesSelect.js:10–15  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

8const CanSelectPathPrefix = 'CanSelectPath-';
9
10function deleteLastObject(str) {
11 return str
12 .split('.')
13 .slice(0, -1)
14 .join('.');
15}
16
17function deleteLastArr(str) {
18 return str.replace(/\[.*?\]/g, '');

Callers 2

componentDidMountFunction · 0.85
VariablesSelect.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected