0xc14m1z/regler

View on GitHub
src/object/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import Validator from '../validator'

function object() {
  this.test = function test(value) {
    return (
      this.parent.test(value)
      && typeof value === 'object'
      && value !== null
      && !(value instanceof Array)
    )
  }

  return this
}

export default Validator.make(object)