open-index/open-npm huggingface dataset:
npm package: @sibokdev/embedded-postgres
Description: A package to run an embedded Postgresql database right from NodeJS
Author: Lei Nelissen
Latest version: 15.1.0-beta.14

# embedded-postgres
A Node package that allows you to spawn a Postgresql cluster programatically.

## Usage
```
npm i embedded-postgres
```

```ts
import EmbeddedPostgres from 'embedded-postgres';

async function main() {
    // Create the object
    const pg = new EmbeddedPostgres({
        data_dir: './data/db',
        user: 'postgres',
        password: 'password',
        port: 5432,
        persistent: true,
    });

    // Create the cluster config files
    await pg.inititialize();

    // Start the server
    await pg.start();

    // Create and/or drop database
    await pg.createDatabase('TEST');
    await pg.dropDatabase('TEST');

    // Initialize a node-postgres client
    const client = pg.getPgClient();
    await client.connect();
    const result = await client.query('SELECT datname FROM pg_database');

    // Stop the server
    await pg.stop();
}

main();
```


## Credits
Embedded Postgres was created by Lei Nelissen for [BMD
Studio](https://bmd.studio). It is based on [zonky's embedded-postgres-binaries](https://github.com/zonkyio/embedded-postgres).
npm package: @sibs-app/react-native-help-scout
Description: Help Scout's Beacon for React Native
Author: Dimitar Nestorov
Latest version: 1.0.8

# React Native Help Scout

[![npm version](https://img.shields.io/npm/v/react-native-help-scout.svg)](https://www.npmjs.com/package/react-native-help-scout)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)

Help Scout's Beacon for React Native.

## Installation

```sh
yarn add react-native-help-scout
```

### iOS

Please visit https://developer.helpscout.com/beacon-2/ios/#additional-setup and complete the steps

## Usage

```javascript
import { Beacon } from 'react-native-help-scout'

// Initialize Beacon
Beacon.init('beacon-id')

// Open Beacon
Beacon.open()
// Open Beacon Secure mode
Beacon.open(signature)

// Set user information in Beacon
Beacon.identify({
	email: 'joshuaheywood@live.com',
	name: 'Joshua Heywood',
	company: 'Megatronic',
	jobTitle: 'Marketing Manager',
})

// Unset user information in Beacon
Beacon.logout()

// Navigate to a specific screen (iOS only)
Beacon.navigate('/ask/message/')

// Open with search
Beacon.search('query')

// Open article
Beacon.openArticle('DOCS_ARTICLE_ID')

// Open contact from
Beacon.contactForm()

// Open previous messages (Android only)
Beacon.previousMessages()

// Dismissing the Beacon (iOS only)
Beacon.dismiss(() => console.log('Beacon dismissed'))

// Event handlers
const openHandler = () => console.log('Beacon opened')
Beacon.events.on('open', openHandler)
Beacon.events.off('open', openHandler)
Beacon.events.off('open')
Beacon.events.once('open', () => console.log('This will only get called the first time the open event is triggered'))

const closeHandler = () => console.log('Beacon closed')
Beacon.events.on('close', closeHandler)
Beacon.events.off('close', closeHandler)
Beacon.events.off('close')
Beacon.events.once('close', () => console.log('This will only get called the first time the close event is triggered'))
```

## Requirements

-   React Native 0.61.0 or newer