0xc14m1z/regler

View on GitHub
src/string/index.js

Summary

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

function string() {
  this.test = function test(value) {
    return (
      this.parent.test(value)
      && (
        typeof value === 'string'
        || value instanceof String
      )
    )
  }

  return this
}

export default Validator.make(string)