# should-check

> object check module using should.js

Latest version **0.1.1** (published 2014-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install should-check
pnpm add should-check
yarn add should-check
bun add should-check
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-09-12 |
| First published | 2014-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | flitto |
| Maintainers | dankang |
| Keywords | should, check |

## Links

- npm: https://www.npmjs.com/package/should-check
- Repository: https://github.com/flitto/should-check
- Issues: https://github.com/flitto/should-check/issues
- npm.io page: https://npm.io/package/should-check

## Dependencies (1)

- [should](https://npm.io/package/should.md) latest

## Recent versions

- 0.1.1 (latest) — 2014-09-12
- 0.1.0 — 2014-09-12
- 0.0.2 — 2014-09-01
- 0.0.1 — 2014-04-15
- 0.0.0 — 2014-03-04

## README

# should-check

node.js object check module using should.js

## About
You can check objects format (for example test cases..)



## Example
```js
var check = require('should-check');

var obj = {
  Model: ['prop1'],
  List: [':[Model]'],
  ModelListObj: ['list:[Model]']
};

var sc = check.init(obj);

sc.check('Model', {prop1: 'val1'});
sc.check('List', [{prop1: 'val1'}]);
sc.check('ModelListObj', {list: [{prop1: 'val1'}]});

var json = sc.checkJSON('Model', '{"prop1": "val1"}');
```

## API
### init(obj)
initialize and return SC object

### sc.check(name, target_obj)
compare target_obj and name of object

### sc.checkJSON(name, json_str)
parse json_str and compare the json and name of object.
Also return the parsed json object.

---
_Source: https://npm.io/package/should-check · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
