merge

Returns the value inside of the Validation structure, regardless of its state.

Signature

merge()
forall a, b: (Validation a b).() => a or b

Documentation

Returns the value inside of the Validation structure, regardless of its state.

Example:

const { Success, Failure } = require('folktale/validation');

Success('a').merge();
// ==> 'a'

Failure('a').merge();
// ==> 'a'

Properties

Source Code

Defined in source/validation/validation.js at line 276, column 26
merge() {
    return this.value;
  }
Licence
MIT
Module
folktale/validation/validation
Authors
Copyright
(c) 2013-2017 Quildreen Motta, and CONTRIBUTORS
Authors
  • Quildreen Motta
Maintainers
  • Quildreen Motta <queen@robotlolita.me> (http://robotlolita.me/)