open-index/open-npm huggingface dataset:
npm package: @quadricia/har-validator
Description: Extremely fast HTTP Archive (HAR) validator using JSON Schema
Author: Ahmad Nassri
Latest version: 5.1.3

# HAR Validator

[![license][license-img]][license-url]
[![version][npm-img]][npm-url]
[![super linter][super-linter-img]][super-linter-url]
[![test][test-img]][test-url]
[![release][release-img]][release-url]

[license-url]: LICENSE
[license-img]: https://badgen.net/github/license/ahmadnassri/node-har-validator

[npm-url]: https://www.npmjs.com/package/har-validator
[npm-img]: https://badgen.net/npm/v/har-validator

[super-linter-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Asuper-linter
[super-linter-img]: https://github.com/ahmadnassri/node-har-validator/workflows/super-linter/badge.svg

[test-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Atest
[test-img]: https://github.com/ahmadnassri/node-har-validator/workflows/test/badge.svg

[release-url]: https://github.com/ahmadnassri/node-har-validator/actions?query=workflow%3Arelease
[release-img]: https://github.com/ahmadnassri/node-har-validator/workflows/release/badge.svg

> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.

## Install

```bash
npm install har-validator
```

## CLI Usage

Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info.

## API

**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/node-har-validator/releases/tag/v2.0.0) this module defaults to Promise based API.
_For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided_

- [async API](docs/async.md)
- [callback API](docs/async.md)
- [Promise API](docs/promise.md) _(default)_
npm package: @quadricia/json-sql
Description: node.js json to sql queries mapper
Author: Artem Zhukov
Latest version: 0.5.1

# JSON-SQL

Node.js library for mapping mongo-style query objects to SQL queries.

This library **is not** a driver, it is only translator, you should use specific driver for your db (for example https://github.com/brianc/node-postgres for PostgreSQL) to execute result query.

## Quick Start

Install it with NPM or add it to your package.json:

``` bash
$ npm install json-sql
```

Then:

``` js
var jsonSql = require('json-sql')();

var sql = jsonSql.build({
	type: 'select',
	table: 'users',
	fields: ['name', 'age'],
	condition: {name: 'Max', id: 6}
});

sql.query
// sql string:
// select name, age from users where name = $p1 && id = 6;

sql.values
// hash of values:
// { p1: 'Max' }
```

## Documentation

Documentation is available at the [./docs directory](./docs).

## Examples

__Select with join:__

``` js
var sql = jsonSql.build({
	type: 'select',
	table: 'users',
	join: {
		documents: {
			on: {'user.id': 'documents.userId'}
		}
	}
});

sql.query
// select * from users join documents on user.id = documents.userId;

sql.values
// {}
```

__Insert:__

``` js
var sql = jsonSql.build({
	type: 'insert',
	table: 'users',
	values: {
		name: 'John',
		lastname: 'Snow',
		age: 24,
		gender: 'male'
	}
});

sql.query
// insert into users (name, lastname, age, gender) values ($p1, $p2, 24, $p3);

sql.values
// { p1: 'John', p2: 'Snow', p3: 'male' }
```

__Update:__

``` js
var sql = jsonSql.build({
	type: 'update',
	table: 'users',
	condition: {
		id: 5
	},
	modifier: {
		role: 'admin'
		age: 33
	}
});

sql.query
// update users set role = $p1, age = 33 where id = 5;

sql.values
// { p1: 'admin' }
```

__Remove:__

``` js
var sql = jsonSql.build({
	type: 'remove',
	table: 'users',
	condition: {
		id: 5
	}
});

sql.query
// delete from users where id = 5;

sql.values
// {}
```

For more examples, take a look at the [./docs directory](./docs) or [./tests directory](./tests).

## Tests

Clone repository from github, `cd` into cloned dir and install dev dependencies:

``` bash
$ npm install
```

Then run tests with command:

``` bash
$ gulp test
```

Or run tests coverage with command:

``` bash
$ gulp coverage
```

## License

[MIT](./LICENSE)