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
- Host: GitHub
- URL: https://github.com/hermanya/value-to-type
- Owner: Hermanya
- License: mit
- Created: 2018-07-12T03:37:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-12T15:31:27.000Z (almost 8 years ago)
- Last Synced: 2024-04-25T15:21:03.327Z (about 2 years ago)
- Language: JavaScript
- Homepage: https://npm.im/value-to-type
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Value to Type [](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)