open-index/open-npm huggingface dataset:
npm package: @fredstrange/sequelize-mock
Description: A simple mock interface specifically for testing code relying on Sequelize models
Author: Blink UX
Latest version: 0.8.2

# Sequelize Mock
[![npm](https://img.shields.io/npm/v/sequelize-mock.svg)](https://www.npmjs.com/package/sequelize-mock) [![CircleCI](https://img.shields.io/circleci/project/BlinkUX/sequelize-mock.svg)](https://circleci.com/gh/BlinkUX/sequelize-mock) [![Coveralls](https://img.shields.io/coveralls/BlinkUX/sequelize-mock.svg)](https://coveralls.io/github/BlinkUX/sequelize-mock) [![MIT License](https://img.shields.io/github/license/BlinkUX/sequelize-mock.svg)](https://github.com/BlinkUX/sequelize-mock) [![Documentation Status](https://readthedocs.org/projects/sequelize-mock/badge/?version=stable)](http://sequelize-mock.readthedocs.io/en/stable/?badge=stable)

A mocking interface designed for testing code that uses [Sequelize](http://sequelizejs.com).

Documentation at [sequelize-mock.readthedocs.io](https://sequelize-mock.readthedocs.io/)

## Install

```
npm i sequelize-mock --save-dev
```

## Getting Started

The Mock Models created with this library function as drop in replacements for your unit testing.

Start by importing the library

```javascript
var SequelizeMock = require('sequelize-mock');
```

Initialize the library as you would Sequelize

```javascript
var DBConnectionMock = new SequelizeMock();
```

Define your models

```javascript
var UserMock = DBConnectionMock.define('users', {
		'email': 'email@example.com',
		'username': 'blink',
		'picture': 'user-picture.jpg',
	}, {
		instanceMethods: {
			myTestFunc: function () {
				return 'Test User';
			},
		},
	});
```

Once Mock models have been defined, you can use them as drop-in replacements for your Sequelize model objects. Data is not retrieved from a database and instead is returned based on the setup of the mock objects, the query being made, and other applied or included information.

For example, your code might look something like this

```javascript
UserMock.findOne({
	where: {
		username: 'my-user',
	},
}).then(function (user) {
	// `user` is a Sequelize Model-like object
	user.get('id');         // Auto-Incrementing ID available on all Models
	user.get('email');      // 'email@example.com'; Pulled from default values
	user.get('username');   // 'my-user'; Pulled from the `where` in the query
	
	user.myTestFunc();      // Will return 'Test User' as defined above
});
```

## Contributing

This library is under active development, so you should feel free to submit issues, questions, or pull requests.

## License

Created by Blink UX and licensed under the MIT license. Check the LICENSE file for more information.
npm package: @fredy-dev/http-parser
Description: A parser for REST client HTTP files that transforms plain text HTTP requests into structured, machine-readable objects
Author: Fredy Sandoval
Latest version: 2.0.0

# HTTP Parser

A standalone parser for REST client HTTP files, that transforms plain text HTTP requests into structured, machine-readable objects. Perfect for building API tools, clients, and integrations.

## Features

- **Parse HTTP Requests**: Supports standard HTTP request syntax with all common features
- **Advanced Features**:
  - Variable support

## Installation

```bash
npm install @fredy/http-parser
```

## Usage

### Quick Start

```typescript
import { parseHttp } from '@fredy/http-parser';

const result: ParseResult = parseHttp(`GET https://api.example.com/users
Authorization: Bearer token123
Content-Type: application/json

{
  "name": "John Doe"
}`);

console.dir(result, { depth: null });
```

## Supported Syntax

### File Variables

Define variables at block and file level:

```http
@baseUrl = https://api.example.com
@contentType = application/json

###
GET {{baseUrl}}/users HTTP/1.1
Content-Type: {{contentType}}

###
# Use the created user's ID in next request
GET https://api.example.com/users/123 HTTP/1.1
Accept: application/json

###
@baseUrl = http://localhost:3000
POST {{baseUrl}}/users HTTP/1.1
Content-Type: application/json

{
  "name": "John Doe",
  "email": "john@example.com"
}

###
HTTP/1.1 201 Created
Content-Type: application/json
Location: {{baseUrl}}/users/123
```

### Variable Scopes In AST

- `ast.globalVariables.fileVariables`: all variable declarations found across all segments.
- `ast.fileScopedVariables.fileVariables`: only declarations that appear before the first `###` delimiter (true file scope).
- `request.blockVariables.fileVariables`: declarations inside that request's segment only.
npm package: @fredyc/draft-js-typeahead
Description: Typeaheads for Draft.js inspired by Facebook.com
Author: Justin Vaillancourt
Latest version: 0.2.0

# draft-js-typeahead

[![NPM version][npm-image]][npm-url]

Typeaheads for [Draft.js](https://github.com/facebook/draft-js) inspired by Facebook.com.

![example](example.gif)

[Check out an example of mentions in draft using draft-js-typeahead here. 🎉](http://dooly-ai.github.io/draft-js-typeahead/)

This package provides a higher-order component that wraps draft's `Editor` component and augments it with typeahead superpowers. One popular use for draft-js-typeahead is to add mentions to your editors.

-

draft-js-typeahead helps in three ways:
 - It figures out *if* and *where* the typeahead should be showing.
 - It keeps track of the typeahead's highlighted item.
 - It triggers a callback when an item is selected (by hitting return).


## Installation

```sh
$ npm install --save draft-js-typeahead
```


## Examples

[Examples are available under the `examples/` directory.](examples/)


## Usage

First we'll need to import `TypeaheadEditor`:

```javascript
import { TypeaheadEditor } from 'draft-js-typeahead';
```

`TypeaheadEditor` is a react component that wraps draft's `Editor`.

-

It supports all of the same properties as the latter, as well as a few others:

`onTypeaheadChange => (typeaheadState)`:

This method is called when the typeahead's *visibility*, *position*, or *text* changes. `typeaheadState` is an object with `left`, `top`, `text`, and `selectedIndex` properties. A typical callback sets `typeaheadState` on its own state and uses it to render an overlay in its component's `render` method. This method is also called when the typeahead is hidden by passing `null` to `typeaheadState`.

`handleTypeaheadReturn => (text, selectedIndex, selection)`:

This method is called when an item in the typeahead is selected (by hitting return). A typical callback autocompletes the editor with the selected item and tags it with a draft entity.

*Note:* By default draft-js-typeahead does not filter items in the typeahead based on the entered text, [see the mentions example for one approach to filtering](/examples/mentions).


## License

MIT © [Justin Vaillancourt](mailto:justin@dooly.ai)


[npm-image]: https://badge.fury.io/js/draft-js-typeahead.svg
[npm-url]: https://npmjs.org/package/draft-js-typeahead