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

# Compass

## Instantiation

To create an instance of Compass, create a  new instance of the library.

Example:

```javascript
const compassEdu = require('compass-edu');

const user = new compassEdu('school_prefix', {settings});
```

#### school\_prefix

The school prefix is a short string used in the URL proceeding `compass.education`, for example, pupils from Templestowe College will use `tc-vic`.

#### Settings

The settings objects are one or more flags parsed to the Compass instance.

These flags include (defaults in brackets):

* showChrome (false) - Shows puppeteer's chromium instance
* pageDelay (2500) - Increases the delay before resolving the promise, you most likely will need to ajust this depending on your network speed<br>

## Events

The currently used events are as follows:

* 'initialized' - called when the Compass-Edu Instance is ready.
* 'logged-in' - called once the Instance has successfully logged in.
*
