mirror of
https://github.com/usebruno/bruno.git
synced 2024-12-01 20:33:28 +01:00
14 lines
395 B
JavaScript
14 lines
395 B
JavaScript
import find from 'lodash/find';
|
|
|
|
export const isItemARequest = (item) => {
|
|
return item.hasOwnProperty('request') && ['http-request', 'graphql-request'].includes(item.type);
|
|
};
|
|
|
|
export const isItemAFolder = (item) => {
|
|
return !item.hasOwnProperty('request') && item.type === 'folder';
|
|
};
|
|
|
|
export const itemIsOpenedInTabs = (item, tabs) => {
|
|
return find(tabs, (t) => t.uid === item.uid);
|
|
};
|