> For the complete documentation index, see [llms.txt](https://krypt0nn.gitbook.io/empathize/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://krypt0nn.gitbook.io/empathize/api/os-api/package.md).

# Package

### Package.exists(name)

```typescript
import { Package, Notification, fetch, promisify } from '@empathize/framework';

promisify(async () => {
    // curl required by fetch
    if (await Package.exists('curl'))
    {
        const header = await fetch('example.com');
    
        // something interesting
    }
    
    // libnotify required by Notification
    else if (await Package.exists('libnotify'))
    {
        Notification.show({
            title: 'An error appeared during fetching data...',
            body: 'You don\'t have curl package to fetch data from the internet. Please, download it',
            icon: '/absolute/path/to/my/icon.png'
        });
    }
    
    else console.error('An error appeared during fetching data from the internet: curl package is required');
});
```
