open-index/open-npm huggingface dataset:
npm package: @schlagerkhan/errors
Description: A set of often used errors that is built upon the [@schlagerkhan/generic-error](https://www.npmjs.com/package/@schlagerkhan/generic-error) package.
Latest version: 0.1.2

# Description

A set of often used errors that is built upon the [@schlagerkhan/generic-error](https://www.npmjs.com/package/@schlagerkhan/generic-error) package.

# API

Errors extending `GenericError`

-   NetworkError
-   AuthError
-   UnknownError

Errors extending `NetworkError`

-   TimeoutError
-   ServerUnavailableError
-   ConnectionError
-   UrlNotFoundError

Errors extending `AuthError`

-   ForbiddenError
-   UnauthorizedError
npm package: @schlagerkhan/generic-error
Description: Builds upon the [extendable-error](https://www.npmjs.com/package/extendable-error) package and exposes a more sophisticated class `GenericError` with some usable classes
Latest version: 0.1.2

# Description

Builds upon the [extendable-error](https://www.npmjs.com/package/extendable-error) package and exposes a more sophisticated class `GenericError` with some usable classes

# OBS

This is guaranteed not according to the theory of computer science. It has more of a practical purpose.

This package extends the native Error object with the functions

-   `toObject()`,
-   `has()`
-   `toString()`
-   `getChildErrorObject()`

# Usage

Create new error

```ts
import { GenericError } from '@schlagerkhan/generic-error';

let genericError = new GenericError();
```

Extend error

```ts
class NetworkError extends GenericError {}

let networkError = new NetworkError();
```

`instanceof` vs `.has()`

```js
class TestError extends GenericError {}

const genericError = new GenericError();
const secondError = new TestError();
const thirdError = new TestError(genericError);

// instanceof

genericError instanceof GenericError; // true
secondError instanceof GenericError; // true
thirdError instanceof GenericError; // true

genericError instanceof TestError; // false
secondError instanceof TestError; // true
thirdError instanceof TestError; // true

// has
genericError.has(GenericError); // true
secondError.has(GenericError); /// false
thirdError.has(GenericError); // true

genericError.has(TestError); // false
secondError.has(TestError); // true
thirdError.has(TestError); // true
```

# API

Constructor

```ts
constructor(message?: string, meta: object, childError: GenericError) {}
```

Instance variables

```ts
- message: String
- meta: Object
- childError: Error | GenericError
```

Instance functions

```ts
- toString(): string
- toObject(): string
- has(errorClass: Error | GenericError): boolean
    // Checks if the instance is itself or has children that is an instance of errorClass
- getChildErrorObject(): ChildErrorObject
    // If childError exists it returns childError.getObject()
```

# Connected projects

[@schlagerkhan/errors](https://github.com/SchlagerKhan/errors/tree/master/packages/errors)
npm package: @schlagerkhan/npm-package-boilerplate
Description: Boilerplate for an npm package
Latest version: 0.0.3

# Npm Package Boilerplate

A simple boilerplate for creating npm packages.

# Features
- Babel 7 (with some nice plugins)
- Jest
- Eslint
- Prettier

# Instructions
Modify the package.json to your reflect project.

Develop your code, create tests and make sure it runs. When you are happy with the result, run `npm publish`to publish it to npm.

If you want to scope your code with, for instance, your username (like this package) - rename your module in the `package.json`and then run `npm publish --access public`.

## Commands
- test: `yarn test` || `yarn test:watch`
- lint: `yarn lint`
- build: `yarn build`

# Todo
- Add coverage

# Contribute
Pull requests are welcome.

# License

[MIT](https://choosealicense.com/licenses/mit/)
npm package: @schlameel/native-idle-time
Description: Cross platform addon to get the user idle time.
Author: Schlameel
Latest version: 1.0.6

# native-idle-time
#### Cross platform NodeJS addon to get user idle time.

native-idle-time queries the native windowing system (Windows, X, macOS) for
the user's idle time, providing the number of milliseconds the user has been
idle.  The idle time is the same that is used to launch screensavers.

## Install
```bash
npm install native-idle-time
```

### Note
```npm``` will try to install a binary version of the addon from Github.  If a
binary does not exist for your platform, ```npm``` will try to build the addon.  
Installing in Linux may require ```libxss-dev``` and npm package ```nan```. If
you are trying to build the addon and it fails with the error message:
```bash
 ../native-idle-time_linux.cc:10:38: fatal error: X11/extensions/scrnsaver.h: No such file or directory
```
then install ```libxss-dev``` with the following:
```bash
sudo apt-get install libxss-dev
```
If you get the error:
```bash
Error: Cannot find module 'nan'
```
then use ```npm``` to install ```nan``` with:
```bash
npm install nan
```

## Usage
```javascript
const idleTime = require('native-idle-time')

setTimeout(() => {
  var millis = idleTime.getMillis()
  console.log(`User idle time: ${millis}ms`)
}, 1000)
```

## API

### native_idle_time.getMillis

Example: ```let millis = native_idle_time.getMillis()```

Returns the time, in milliseconds, the system has gone without user input. If
the addon cannot determine the time (no DISPLAY, ssh session, etc.), ```-1``` is returned.

## License
[MIT](https://opensource.org/licenses/MIT)
npm package: @schlechtwetterfront/vue-datepicker
Description: A customizable datepicker for Vue 3
Author: Benedikt Schatz
Latest version: 0.3.1

# `vue-datepicker` [![npm (scoped)](https://img.shields.io/npm/v/@schlechtwetterfront/vue-datepicker)](https://www.npmjs.com/package/@schlechtwetterfront/vue-datepicker)

A customizable datepicker for Vue 3. Has a peer dependency on `date-fns` `2.x`.

Check out the playground/examples [here](https://schlechtwetterfront.github.io/vue-datepicker)

## Usage

Install package and dependencies

```bash
# yarn
yarn add @schlechtwetterfront/vue-dialogs
yarn add date-fns

# npm
npm install @schlechtwetterfront/vue-dialogs
npm install date-fns
```

This library does not need a global installation. Instead just import one of the components like `Picker` and use them

```vue
<template>
    <section class="my-app">
        <Picker v-model="myDate" />
    </section>
</template>

<script>
import { ref } from 'vue';
import { Picker } from '@schlechtwetterfront/vue-datepicker';

export default {
    components: { Picker },
    setup() {
        const myDate = ref(new Date());

        return { myDate };
    },
};
</script>
```

For more detailed documentation see:

-   [Usage](docs/usage.md)
-   [Props](docs/props.md)
-   [`<input>` element](docs/input-el.md)
-   [Slots](docs/slots.md)
-   [i18n](docs/i18n.md)
-   [Styling & transitions](docs/styling-and-transitions.md)
npm package: @schleichermann/prettier-config
Description: My personal Prettier config
Author: Tim Clark
Latest version: 1.0.0

# @tim-lynn-clark/prettier-config
> My personal [Prettier](https://prettier.io/docs/en/configuration.html) config

## Usage

### Install:

```bash
$ npm install @schleichermann/prettier-config --save-dev
```

```bash
$ yarn add --dev @schleichermann/prettier-config
```

### Config Setup:

Two options for setup in your project.

**Option 1: Edit `package.json`**

```jsonc
{
  // ...
  "prettier": "@schleichermann/prettier-config"
}
```

**Option 2: Edit `.prettierrc.js`**

```javascript
module.exports = {
  ...require("@schleichermann/prettier-config"),
  semi: false,
};
```
npm package: @schleifner/asc-to-header
Description: This tool is used for translate an AssemblyScript type definiton file to C++ header file.
Author: Schleifner
Latest version: 0.2.0

# AssemblyScript C Header Translator
This tool is used for translate an AssemblyScript type definiton file to C++ header file.

## build
```
npm install
npm run bundle
```
## run
`node --experimental-modules bin/Cli.js -f [input assemblyscript file] -o [target header file]`  
output:  
C Header file

## Example
`example.ts`:  
```typescript
enum Status{
    OK=0x1,
    FAIL=0x2
}

export declare function printStatus(Status:Status);
```

output:  
`example.h`:  
```C++

#ifndef __types_wasm_example_H__
#define __types_wasm_example_H__
extern "C" {
enum class Status {
  OK = 0x1,
  FAIL = 0x2,
};
__attribute__((import_module("example"))) void printStatus(Status Status);

}
#endif


```

## cuation
### Function pointer type
For function type declaration, when use it in the function parameter, should use the same name.  
for example:  
ASC
```typescript
export type mycallback = (data: i32) => void;
export function callService(mycallback: i32):void;
```
then we can translate to:  
```C++
using mycallback = void (*) (int data);
 __attribute__((import_module("test"))) void callService(mycallback mycallback);

```

but if we got asc like:  
ASC
```typescript
export type mycallback = (data: i32) => void;
export function callService(my_callback: i32):void;
```
then we can translate to:  
```C++
using mycallback = void (*) (int data);
 __attribute__((import_module("test"))) void callService(int my_callback);

```

### UserData Type
Some user data type, which is often used as C like API context, is usually a pointer type. Type `UserDataType` is designed as a reserved type. This type will be translated to `uintptr_t` in C++.