An open API service indexing awesome lists of open source software.

https://github.com/hermanya/value-to-type

Get schema from data; great for making quick assertions in integration tests
https://github.com/hermanya/value-to-type

Last synced: 8 months ago
JSON representation

Get schema from data; great for making quick assertions in integration tests

Awesome Lists containing this project

README

          

# Value to Type [![Build Status](https://travis-ci.org/hermanya/value-to-type.svg?branch=master)](https://travis-ci.org/hermanya/value-to-type)

>

## Install

```shell
npm install value-to-type
```

## Usage

```js
const valueToType = require('value-to-type');

valueToType('unicorns');
//=> 'string'
```

## API

### valueToType(value)

#### input

Type: `any`

For example:

```js
[{rainbow: 'unicorns'}, {rainbow: 'cats'}]
```

Output:

```js
[{rainbow: 'string'}]
```

## License

MIT © [Herman](https://github.com/hermanya)