open-index/open-npm huggingface dataset:
npm package: @sawerjs/load-file
Description: Load Typescript & Javascript files for both commonjs and esm using swc.
Author: mrozio13pl
Latest version: 0.0.1

# @sawerjs/load-file

Load Typescript & Javascript files for both commonjs and esm using
[swc](https://swc.rs/).

## Usage

```ts
// some-file.ts
export const foo = 'bar';
```

```ts
import { loadFile } from '@sawerjs/load-file';

const { foo } = await loadFile('./some-file.ts');
// => bar
```

### Arguments

-   **filename**: The path to the file to load.
-   **cwd** (optional): The current working directory.

### Using with CommonJS

```js
const { loadFile } = require('@sawerjs/load-file');
```

<hr />

This package is part of [sawer](https://github.com/mrozio13pl/sawer.js).
npm package: @sawerjs/logger
Description: Simple logger used by sawer
Author: mrozio13pl
Latest version: 0.0.0

# @sawerjs/logger

Simple logger used by sawer.

This should be preferably used only in development mode for now as it brings [`picocolors`](https://npm.im/picocolors) dependency with it. If that's not a problem for you and you just want a simple logger, feel free to use it.

## Usage

A basic example:

```js
import logger from '@sawerjs/logger';

logger.success('Hello, world!');
// "● Hello, world!"
```

### Create a new logger

Create a new instance of the logger with `new Logger()`:

```js
import { Logger } from '@sawerjs/logger';

const logger = new Logger();
```

### Enable debug mode

Enable debug mode with `Logger.setDebug(true)`:

```js
import logger from '@sawerjs/logger';

logger.setDebug(true);
logger.debug('Debug message');
// "● Debug message"
```

Alternatively you can enable debug mode when creating a logger:

```js
import { Logger } from '@sawerjs/logger';

const logger = new Logger({ debug: true });
```

## API

-   `log.success(...args)` calls `console.log` with green dot (`●`) prefix

-   `log.info(...args)` calls `console.log` with blue dot (`●`) prefix

-   `log.warn(...args)` calls `console.log` with yellow dot (`●`) prefix

-   `log.error(...args)` calls `console.log` with red dot (`●`) prefix

-   `log.debug(...args)` calls `console.log` with magenta dot (`●`)

    Note that debug mode must be enabled with `Logger.setDebug(true)`

-   `log.log(...args)` simply calls `console.log(...args)`

-   `log.setDebug(debug)` sets debug mode

-   `log.enableDebug` variable is `true` when debug mode is enabled

## License

This project is licensed under the [MIT](https://github.com/mrozio13pl/sawer/blob/main/license) License ❤️
npm package: @sawjan/teamup-client
Description: Simple client for Teamup calendar API
Author: Sawjan G.
Latest version: 2.0.1

## Teamup Calendar Client

A library for working with [Teamup](https://www.teamup.com/) calendar.

### Installation

```bash
npm i @sawjan/teamup-client
```

### Usage

```js
const TeamupClient = require('@sawjan/teamup-client')

const client = new TeamupClient({
  url: 'https://api.teamup.com',
  calendarKey: '<calendar-key>',
  teamupToken: '<teamup-token>',
  bearerToken: '<bearer-token>',
})
```

### Examples

See example code: [examples](./examples/)

### APIs

#### **Event**

- .**getEvents**([options])

  For available options see [Query Parameters](https://apidocs.teamup.com/docs/api/0f9f896800ffe-get-events-collection-get-events-changed-search-events#Query-Parameters)

- .**getAllDayEvents**([options])
- .**getRecurringEvents**([options])
- .**getEvent**(eventId)

#### **SubCalendar**

- .**getSubCalendars**([options])

  For available options see [Query Parameters](https://apidocs.teamup.com/docs/api/046361930f27a-get-a-collection-of-sub-calendars#Query-Parameters)

- .**getInactiveSubCalendars**([options])
- .**getSubCalendar**(subCalendarId):
- .**getSubCalendarByName**(subCalendarName)

All APIs will either return Promise\<[SuccessResponse](#successresponse)\> or throw Promise\<[ErrorResponse](#errorresponse)\>

## Structs

### SuccessResponse

```js
{
  status: <number>,
  statusText: <string>,
  data: <array>|<object>
}
```

### ErrorResponse

```js
{
  status: <number>,
  statusText: <string>,
  error: <object>
}
```