open-index/open-npm huggingface dataset:
npm package: @rebble/linked-list
Description: Pebble library for doing linked lists
Author: Matthew Tole
Latest version: 1.5.1

# Linked List [![Build Status](https://github.com/pebble-dev/linked-list/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/pebble-dev/linked-list/actions/workflows/ci.yml)&nbsp;[![npm (scoped)](https://img.shields.io/npm/v/@rebble/linked-list.svg?maxAge=2592000&style=flat-square)](https://www.npmjs.com/package/@rebble/linked-list)&nbsp;[![MIT License](http://img.shields.io/badge/license-MIT-lightgray.svg?style=flat-square)](./LICENSE)

A simple linked list implementation for Pebble apps and watchfaces.

## Installation

*You must be using Pebble SDK 3.12 or newer to use this library.*

To install the package to your app, use the pebble tool:

```
pebble package install @rebble/linked-list
```

## Usage

```c
// This is not a complete example, but should demonstrate the basic usage of
// the Linked List library.

#include <@rebble/linked-list/linked-list.h>

LinkedRoot* root;

static void init(void) {
  root = linked_list_create_root();
  linked_list_append(root, data);
  printf("%d", linked_list_count(root));
}

static void deinit(void) {
  linked_list_clear(root);
  destroy(root);
}
```

## Tests

Unit tests for Data Processor exist in the `tests` folder.

To run the tests:

```sh
make test
```
npm package: @rebble/sdk-c-utils
Description: A small collection of C macros that make developing Pebble apps a little simpler.
Author: Matthew Tole
Latest version: 1.2.3

# Utils [![npm (scoped)](https://img.shields.io/npm/v/@smallstoneapps/utils.svg?maxAge=2592000&style=flat-square)](https://www.npmjs.com/package/@smallstoneapps/utils)&nbsp;[![MIT License](http://img.shields.io/badge/license-MIT-lightgray.svg?style=flat-square)](./LICENSE)

This is a small collection of [C macros][1] that make developing Pebble apps a little simpler.

## Installation

*You must be using Pebble SDK 3.12 or newer to use this library.*

To install the package to your app, use the pebble tool:

```
pebble package install @smallstoneapps/utils
```

## Usage

Include the header file in your source code.

```c
#include <@smallstoneapps/utils/macros.h>
```

## Documentation

### Logging

Shorthand wrappers for using APP_LOG with the various levels of logs.

```c
// Create a new DEBUG log message. Similar functions exist for INFO, WARN and ERROR.
DEBUG("Here is a logging message of value %d", 5);
```

### Layer Helpers

There are a number of macros for creating layers, and the various subtypes of layers.
Below are some examples, check out the source code for the full list.

```c
// Creates a new layer that is the size of the window, and adds it to the window.
// Similarly named functions exist for all layer types.
Layer* layer = layer_create_fullscreen(window);
layer_add_to_window(layer, window);
```

```c
// The menu layer version of this function also handles assigning the click handlers.
menu_layer_add_to_window(menu, window);
```

```c
// Prevent crashes caused by attempting to destroy an already destroyed layer,
// the `*_destroy_safe()` functions wrap destroy in a NULL check.
layer_destroy_safe(layer);
```

```c
// Show a hidden layer.
layer_show(layer);
// Hide a layer.
layer_hide(layer);
```


### Persistent Helpers

Check that a persistent key exists before reading it, and returning a default value if it doesn't.

```c
// If KEY_NUMBER exists, return the value stored there, otherwise return -1
int number = persist_read_int_safe(KEY_NUMBER, -1);
```

### Miscellaneous

```c
// Checks that data is not NULL before attempting to free.
free_safe(data);
```

```c
// Checks that the app timer exists before attempting to cancel.
app_timer_cancel_safe(timer);
```

```c
// Opens the app message with the maximum inbox and outbox size.
app_message_open_max();
```

[1]: http://gcc.gnu.org/onlinedocs/cpp/Macros.html
npm package: @rebean/async
Description: Redux async bean
Author: Piotr Oleś
Latest version: 0.0.3

# @rebean/async

> Async utilities for Redux

## Installation

This module is available as a npm package. To start using it, you have to install it first.

```
npm install --save @rebean/async
```

After installing it, you have to add snackbar reducer to your root reducer.

```typescript
import { createStore, combineReducers, applyMiddleware } from 'redux';
import {
  asyncReducer,
  asyncMiddleware,
  asyncActionSanitizer
} from '@rebean/async';
import thunkMiddleware from 'redux-thunk';
// if you are using Redux Devtools
import { composeWithDevTools } from 'redux-devtools-extension';

const rootReducer = combineReducers({
  // ...your other reducers here
  // you have to pass asyncReducer under 'async' key,
  async: asyncReducer
});

// to block actions that are not in proper chronology
const middlewareEnhancer = applyMiddleware(
  thunkMiddleware,
  asyncMiddleware
  // ...other middleware
);

// to see async action status and parameters in Redux Devtools
const composeEnhancers = composeWithDevTools({
  actionSanitizer: asyncActionSanitizer
});

const enhancer = composeEnhancers(middlewareEnhancer);
const initialState = {};

const store = createStore(rootReducer, initialState, enhancer);
```

Now you can connect it to your components - redux knows how to handle async actions.

## Usage

To define async action you need redux-thunk installed and connected to the store.
The easiest way to create new async action creator is to use `async` function
from this package. Then you have to create reducer - you can use `handle*` higher order
reducers to create your own.

Example of fetching list of users:

```typescript
// store/user/userAction.ts

import { async, AsyncAction } from '@rebean/async';

export const LIST_USERS = 'LIST_USERS';
export type ListUsersAction = AsyncAction<User[]>;
export const listUsers = (): ThunkAction<Promise<User[]>> => dispatch =>
  dispatch(async(LIST_USERS, UserApi.list()));
```

```typescript
// store/user/userReducer.ts
import { handleAsync } from '@rebean/async';
import { combineReducers } from 'redux';
import { LIST_USERS, ListUsersAction } from './userAction';

const listUsersReducer = handleResolved<User[], ListUsersAction>(
  LIST_USERS,
  (state, action) => action.payload,
  []
);

export const userReducer = combineReducers({
  users: listUsersReducer
});
```

```typescript jsx
// component/UserList/UserList.tsx

import { isAsyncPending } from '@rebean/async';
import { LIST_USERS } from '../../store/user/userAction.ts';

export namespace UserList {
  export type StateProps = {
    isLoading: boolean;
    users: User[];
  };
  export type OwnProps = {};
  export type Props = StateProps & OwnProps;
}

const UserListDumb: FC<UserList.Props> = ({ isLoading, users }) => {
  if (isLoading) {
    return 'Loading...';
  }

  return (
    <ul>
      {users.map(user => (
        <li key={user.id}>{user.name}</li>
      ))}
    </ul>
  );
};

export const UserList = connect(state => ({
  isLoading: isAsyncPending(LIST_USERS)(state),
  users: getUsers(state)
}))(UserListDumb);
```

## License

MIT
npm package: @rebean/snackbar
Description: Redux snackbar bean
Author: Piotr Oleś
Latest version: 0.0.3-alpha.0

# Rebean Snackbar

> Snackbar behavior based on Material Design guidelines

## Installation

This module is available as a npm package. To start using it, you have to install it first.

```
npm install --save @rebean/snackbar
```

After installing it, you have to add snackbar reducer to your root reducer.

```typescript
import { createStore, combineReducers } from 'redux';
import { snackbarReducer } from '@rebean/snackbar';

const rootReducer = combineReducers({
  // ...your other reducers here
  // you have to pass snackbarReducer under 'snackbar' key,
  snackbar: snackbarReducer
});

const store = createStore(rootReducer);
```

Now you can connect it to your components - redux knows how to handle snackbar actions.

## Usage

## Contributing

## License

MIT
npm package: @rebecarose/react-markdown-editor
Description: React component for markdown editor
Author: Rebeca Rose
Latest version: 0.1.3

# React Markdown Editor

React Markdown is available as an [npm package](https://www.npmjs.com/package/@rebecarose/react-markdown-editor "npm package").
## Installation

```
- with npm
npm install @rebecarose/react-markdown-editor

- with yarn
yarn add @rebecarose/react-markdown-editor
```

## Getting started with React Markdown Editor

View the [Demo](https://rebecarose.github.io/react-markdown-editor "Demo") and its source for more.
```
import React, {useState} from 'react';
import { MarkdownEditor } from '@rebecarose/react-markdown-editor';


const App = () => {
    const [value, setValue] = useState('');
    return (
        <MarkdownEditor
            value={value}
            onChange={e => setValue(e)}
        />
    )
}
```
npm package: @rebecarose/react-table
Description: React table component
Author: Rebeca Rose
Latest version: 0.1.4

# React Table

React Table is available as an [npm package](https://www.npmjs.com/package/@rebecarose/react-table "npm package").
## Installation

```
- with npm
npm install @rebecarose/react-table

- with yarn
yarn add @rebecarose/react-table
```

## Getting started with React Table

View the [Demo](https://rebecarose.github.io/react-table "Demo") and its source for more.
```
import React, {useState} from 'react';
import { Table } from '@rebecarose/react-table';

const fields = [
    {title: 'Id', key: 'id', type: 'number'},
    {title: 'Name', key: 'name', type: 'string'},
];

const items = [
    {id: 1, name: 'João'},
    {id: 2, name: 'Maria'},
    {id: 3, name: 'Ana'},
    {id: 4, name: 'Matheus'},
    {id: 5, name: 'Gabriel'},
];

const App = () => {
    return (
        <Table
            items={items}
            fields={fields}
        />
    )
}
```
npm package: @rebeccapeltz/fun-run
Description: fun-runrun provides a wrapper that runs a function and measures the time elapsed
Author: Becky Peltz
Latest version: 1.0.0

# fun-run:  
Function Runner: A package that provides a wrapper and timer around a function

This is useful for measuring performance in time it takes to execute a function.

The package includes a function, `runFunctionWithArg(func, ...args)` that runs the 
function named in the parameter `func`.  If there are arguments for the function,
they are passed as comma separated values after the name of the function.

The function returns an array with the result of the function first and the execution time in milliseconds last.

## Usage

Import the package

```
const funRun = require("fun-run");
```

Define the function that you want to run.

```
function add(x, y)
    return x + 1
```

Call the function as a parameter to `runFunctionWithArg`

```
const [result, executionTime] = funRun.runFunctionWithArg(add,3,2);
```

See `test/script.js` for a sample test