decoders 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/format.mjs CHANGED
@@ -1,140 +1,130 @@
1
- import { summarize as _summarize, asDate, INDENT, indent, isMultiline } from './_utils.mjs';
1
+ import { summarize as _summarize, asDate, INDENT, indent, isMultiline } from './_utils.mjs'
2
2
 
3
3
  function serializeString(s, width) {
4
4
  if (width === void 0) {
5
- width = 80;
5
+ width = 80
6
6
  }
7
-
8
- // Full string
9
- // Abbreviated to $maxlen i.e. "Vincent Driess..." [truncated]
10
- var ser = JSON.stringify(s);
7
+ var ser = JSON.stringify(s)
11
8
 
12
9
  if (ser.length <= width) {
13
- return ser;
14
- } // Cut off a bit
15
-
10
+ return ser
11
+ }
16
12
 
17
- var truncated = s.substring(0, width - 15) + '...';
18
- ser = JSON.stringify(truncated) + ' [truncated]';
19
- return ser;
13
+ var truncated = s.substring(0, width - 15) + '...'
14
+ ser = JSON.stringify(truncated) + ' [truncated]'
15
+ return ser
20
16
  }
21
17
 
22
18
  function serializeArray(annotation, prefix) {
23
- var items = annotation.items;
19
+ var items = annotation.items
24
20
 
25
21
  if (items.length === 0) {
26
- return '[]';
22
+ return '[]'
27
23
  }
28
24
 
29
- var result = [];
25
+ var result = []
30
26
  items.forEach(function (item) {
31
- var _serializeAnnotation = serializeAnnotation(item, prefix + INDENT),
32
- ser = _serializeAnnotation[0],
33
- ann = _serializeAnnotation[1];
27
+ var _serializeAnnotation = serializeAnnotation(item, '' + prefix + INDENT),
28
+ ser = _serializeAnnotation[0],
29
+ ann = _serializeAnnotation[1]
34
30
 
35
- result.push(prefix + INDENT + ser + ',');
31
+ result.push('' + prefix + INDENT + ser + ',')
36
32
 
37
33
  if (ann !== undefined) {
38
- result.push(indent(ann, prefix + INDENT));
34
+ result.push(indent(ann, '' + prefix + INDENT))
39
35
  }
40
- });
41
- return ['['].concat(result, [prefix + ']']).join('\n');
36
+ })
37
+ return ['['].concat(result, [prefix + ']']).join('\n')
42
38
  }
43
39
 
44
40
  function serializeObject(annotation, prefix) {
45
- var fields = annotation.fields;
46
- var fieldNames = Object.keys(fields);
41
+ var fields = annotation.fields
42
+ var fieldNames = Object.keys(fields)
47
43
 
48
44
  if (fieldNames.length === 0) {
49
- return '{}';
45
+ return '{}'
50
46
  }
51
47
 
52
- var result = [];
48
+ var result = []
53
49
  fieldNames.forEach(function (key) {
54
- var valueAnnotation = fields[key];
55
- var kser = serializeValue(key);
56
- var valPrefix = prefix + INDENT + ' '.repeat(kser.length + 2);
50
+ var valueAnnotation = fields[key]
51
+ var kser = serializeValue(key)
52
+ var valPrefix = '' + prefix + INDENT + ' '.repeat(kser.length + 2)
57
53
 
58
- var _serializeAnnotation2 = serializeAnnotation(valueAnnotation, prefix + INDENT),
59
- vser = _serializeAnnotation2[0],
60
- vann = _serializeAnnotation2[1];
54
+ var _serializeAnnotation2 = serializeAnnotation(valueAnnotation, '' + prefix + INDENT),
55
+ vser = _serializeAnnotation2[0],
56
+ vann = _serializeAnnotation2[1]
61
57
 
62
- result.push(prefix + INDENT + kser + ': ' + vser + ',');
58
+ result.push('' + prefix + INDENT + kser + ': ' + vser + ',')
63
59
 
64
60
  if (vann !== undefined) {
65
- result.push(indent(vann, valPrefix));
61
+ result.push(indent(vann, valPrefix))
66
62
  }
67
- });
68
- return ['{'].concat(result, [prefix + '}']).join('\n');
63
+ })
64
+ return ['{'].concat(result, [prefix + '}']).join('\n')
69
65
  }
70
66
 
71
67
  export function serializeValue(value) {
72
- // istanbul ignore else
73
68
  if (typeof value === 'string') {
74
- return serializeString(value);
69
+ return serializeString(value)
75
70
  } else if (typeof value === 'number' || typeof value === 'boolean') {
76
- return value.toString();
71
+ return value.toString()
77
72
  } else if (value === null) {
78
- return 'null';
73
+ return 'null'
79
74
  } else if (value === undefined) {
80
- return 'undefined';
75
+ return 'undefined'
81
76
  } else {
82
- var valueAsDate = asDate(value);
77
+ var valueAsDate = asDate(value)
83
78
 
84
79
  if (valueAsDate !== null) {
85
- return "new Date(" + JSON.stringify(valueAsDate.toISOString()) + ")";
80
+ return 'new Date(' + JSON.stringify(valueAsDate.toISOString()) + ')'
86
81
  } else if (value instanceof Date) {
87
- // NOTE: Using `instanceof Date` is unreliable way of checking dates.
88
- // If this case occurs (and it didn't pass the prior asDate())
89
- // check, then this must be the case where it's an invalid date.
90
- return '(Invalid Date)';
82
+ return '(Invalid Date)'
91
83
  } else {
92
- return '(unserializable)';
84
+ return '(unserializable)'
93
85
  }
94
86
  }
95
87
  }
96
88
  export function serializeAnnotation(ann, prefix) {
97
89
  if (prefix === void 0) {
98
- prefix = '';
90
+ prefix = ''
99
91
  }
100
-
101
- // The serialized data (the input object echoed back)
102
- var serialized;
92
+ var serialized
103
93
 
104
94
  if (ann.type === 'array') {
105
- serialized = serializeArray(ann, prefix);
95
+ serialized = serializeArray(ann, prefix)
106
96
  } else if (ann.type === 'object') {
107
- serialized = serializeObject(ann, prefix);
97
+ serialized = serializeObject(ann, prefix)
108
98
  } else if (ann.type === 'function') {
109
- serialized = '<function>';
99
+ serialized = '<function>'
110
100
  } else if (ann.type === 'circular-ref') {
111
- serialized = '<circular ref>';
101
+ serialized = '<circular ref>'
112
102
  } else if (ann.type === 'unknown') {
113
- serialized = '???';
103
+ serialized = '???'
114
104
  } else {
115
- serialized = serializeValue(ann.value);
105
+ serialized = serializeValue(ann.value)
116
106
  }
117
107
 
118
- var text = ann.text;
108
+ var text = ann.text
119
109
 
120
110
  if (text !== undefined) {
121
- var sep = '^'.repeat(isMultiline(serialized) ? 1 : serialized.length);
122
- return [serialized, [sep, text].join(isMultiline(text) ? '\n' : ' ')];
111
+ var sep = '^'.repeat(isMultiline(serialized) ? 1 : serialized.length)
112
+ return [serialized, [sep, text].join(isMultiline(text) ? '\n' : ' ')]
123
113
  } else {
124
- return [serialized, undefined];
114
+ return [serialized, undefined]
125
115
  }
126
116
  }
127
117
  export function formatInline(ann) {
128
118
  var _serializeAnnotation3 = serializeAnnotation(ann),
129
- serialized = _serializeAnnotation3[0],
130
- annotation = _serializeAnnotation3[1];
119
+ serialized = _serializeAnnotation3[0],
120
+ annotation = _serializeAnnotation3[1]
131
121
 
132
122
  if (annotation !== undefined) {
133
- return serialized + '\n' + annotation;
123
+ return serialized + '\n' + annotation
134
124
  } else {
135
- return serialized;
125
+ return serialized
136
126
  }
137
127
  }
138
128
  export function formatShort(ann) {
139
- return _summarize(ann, []).join('\n');
140
- }
129
+ return _summarize(ann, []).join('\n')
130
+ }
package/index.js CHANGED
@@ -1,89 +1,89 @@
1
- "use strict";
1
+ 'use strict'
2
2
 
3
- exports.__esModule = true;
4
- exports.uuidv4 = exports.uuidv1 = exports.uuid = exports.url = exports.unknown = exports.undefined_ = exports.tuple = exports.truthy = exports.taggedUnion = exports.string = exports.set = exports.regex = exports.prep = exports.positiveNumber = exports.positiveInteger = exports.pojo = exports.poja = exports.optional = exports.oneOf = exports.object = exports.numericBoolean = exports.number = exports.nullable = exports.null_ = exports.nonEmptyString = exports.nonEmptyArray = exports.never = exports.mixed = exports.maybe = exports.mapping = exports.lazy = exports.jsonObject = exports.jsonArray = exports.json = exports.iso8601 = exports.integer = exports.instanceOf = exports.inexact = exports.httpsUrl = exports.hardcoded = exports.fail = exports.exact = exports.email = exports.either = exports.dict = exports.define = exports.date = exports.constant = exports["boolean"] = exports.array = exports.anyNumber = exports.always = void 0;
3
+ exports.__esModule = true
4
+ exports.uuidv4 = exports.uuidv1 = exports.uuid = exports.url = exports.unknown = exports.undefined_ = exports.tuple = exports.truthy = exports.taggedUnion = exports.string = exports.set = exports.regex = exports.prep = exports.positiveNumber = exports.positiveInteger = exports.pojo = exports.poja = exports.optional = exports.oneOf = exports.object = exports.numericBoolean = exports.number = exports.nullable = exports.null_ = exports.nonEmptyString = exports.nonEmptyArray = exports.never = exports.mixed = exports.maybe = exports.mapping = exports.lazy = exports.jsonObject = exports.jsonArray = exports.json = exports.iso8601 = exports.integer = exports.instanceOf = exports.inexact = exports.httpsUrl = exports.hardcoded = exports.fail = exports.exact = exports.email = exports.either = exports.dict = exports.define = exports.date = exports.constant = exports['boolean'] = exports.array = exports.anyNumber = exports.always = void 0
5
5
 
6
- var _Decoder = require("./Decoder");
6
+ var _Decoder = require('./Decoder')
7
7
 
8
- exports.define = _Decoder.define;
8
+ exports.define = _Decoder.define
9
9
 
10
- var _basics = require("./lib/basics");
10
+ var _basics = require('./lib/basics')
11
11
 
12
- exports.always = _basics.always;
13
- exports.constant = _basics.constant;
14
- exports.hardcoded = _basics.hardcoded;
15
- exports.maybe = _basics.maybe;
16
- exports.mixed = _basics.mixed;
17
- exports.nullable = _basics.nullable;
18
- exports.null_ = _basics.null_;
19
- exports.optional = _basics.optional;
20
- exports.undefined_ = _basics.undefined_;
21
- exports.unknown = _basics.unknown;
12
+ exports.always = _basics.always
13
+ exports.constant = _basics.constant
14
+ exports.hardcoded = _basics.hardcoded
15
+ exports.maybe = _basics.maybe
16
+ exports.mixed = _basics.mixed
17
+ exports.nullable = _basics.nullable
18
+ exports.null_ = _basics.null_
19
+ exports.optional = _basics.optional
20
+ exports.undefined_ = _basics.undefined_
21
+ exports.unknown = _basics.unknown
22
22
 
23
- var _arrays = require("./lib/arrays");
23
+ var _arrays = require('./lib/arrays')
24
24
 
25
- exports.array = _arrays.array;
26
- exports.nonEmptyArray = _arrays.nonEmptyArray;
27
- exports.poja = _arrays.poja;
28
- exports.set = _arrays.set;
29
- exports.tuple = _arrays.tuple;
25
+ exports.array = _arrays.array
26
+ exports.nonEmptyArray = _arrays.nonEmptyArray
27
+ exports.poja = _arrays.poja
28
+ exports.set = _arrays.set
29
+ exports.tuple = _arrays.tuple
30
30
 
31
- var _booleans = require("./lib/booleans");
31
+ var _booleans = require('./lib/booleans')
32
32
 
33
- exports["boolean"] = _booleans["boolean"];
34
- exports.numericBoolean = _booleans.numericBoolean;
35
- exports.truthy = _booleans.truthy;
33
+ exports['boolean'] = _booleans['boolean']
34
+ exports.numericBoolean = _booleans.numericBoolean
35
+ exports.truthy = _booleans.truthy
36
36
 
37
- var _dates = require("./lib/dates");
37
+ var _dates = require('./lib/dates')
38
38
 
39
- exports.date = _dates.date;
40
- exports.iso8601 = _dates.iso8601;
39
+ exports.date = _dates.date
40
+ exports.iso8601 = _dates.iso8601
41
41
 
42
- var _objects = require("./lib/objects");
42
+ var _objects = require('./lib/objects')
43
43
 
44
- exports.dict = _objects.dict;
45
- exports.exact = _objects.exact;
46
- exports.inexact = _objects.inexact;
47
- exports.mapping = _objects.mapping;
48
- exports.object = _objects.object;
49
- exports.pojo = _objects.pojo;
44
+ exports.dict = _objects.dict
45
+ exports.exact = _objects.exact
46
+ exports.inexact = _objects.inexact
47
+ exports.mapping = _objects.mapping
48
+ exports.object = _objects.object
49
+ exports.pojo = _objects.pojo
50
50
 
51
- var _unions = require("./lib/unions");
51
+ var _unions = require('./lib/unions')
52
52
 
53
- exports.either = _unions.either;
54
- exports.oneOf = _unions.oneOf;
55
- exports.taggedUnion = _unions.taggedUnion;
53
+ exports.either = _unions.either
54
+ exports.oneOf = _unions.oneOf
55
+ exports.taggedUnion = _unions.taggedUnion
56
56
 
57
- var _strings = require("./lib/strings");
57
+ var _strings = require('./lib/strings')
58
58
 
59
- exports.email = _strings.email;
60
- exports.httpsUrl = _strings.httpsUrl;
61
- exports.nonEmptyString = _strings.nonEmptyString;
62
- exports.regex = _strings.regex;
63
- exports.string = _strings.string;
64
- exports.url = _strings.url;
65
- exports.uuid = _strings.uuid;
66
- exports.uuidv1 = _strings.uuidv1;
67
- exports.uuidv4 = _strings.uuidv4;
59
+ exports.email = _strings.email
60
+ exports.httpsUrl = _strings.httpsUrl
61
+ exports.nonEmptyString = _strings.nonEmptyString
62
+ exports.regex = _strings.regex
63
+ exports.string = _strings.string
64
+ exports.url = _strings.url
65
+ exports.uuid = _strings.uuid
66
+ exports.uuidv1 = _strings.uuidv1
67
+ exports.uuidv4 = _strings.uuidv4
68
68
 
69
- var _utilities = require("./lib/utilities");
69
+ var _utilities = require('./lib/utilities')
70
70
 
71
- exports.fail = _utilities.fail;
72
- exports.instanceOf = _utilities.instanceOf;
73
- exports.lazy = _utilities.lazy;
74
- exports.never = _utilities.never;
75
- exports.prep = _utilities.prep;
71
+ exports.fail = _utilities.fail
72
+ exports.instanceOf = _utilities.instanceOf
73
+ exports.lazy = _utilities.lazy
74
+ exports.never = _utilities.never
75
+ exports.prep = _utilities.prep
76
76
 
77
- var _numbers = require("./lib/numbers");
77
+ var _numbers = require('./lib/numbers')
78
78
 
79
- exports.anyNumber = _numbers.anyNumber;
80
- exports.integer = _numbers.integer;
81
- exports.number = _numbers.number;
82
- exports.positiveInteger = _numbers.positiveInteger;
83
- exports.positiveNumber = _numbers.positiveNumber;
79
+ exports.anyNumber = _numbers.anyNumber
80
+ exports.integer = _numbers.integer
81
+ exports.number = _numbers.number
82
+ exports.positiveInteger = _numbers.positiveInteger
83
+ exports.positiveNumber = _numbers.positiveNumber
84
84
 
85
- var _json = require("./lib/json");
85
+ var _json = require('./lib/json')
86
86
 
87
- exports.json = _json.json;
88
- exports.jsonObject = _json.jsonObject;
89
- exports.jsonArray = _json.jsonArray;
87
+ exports.json = _json.json
88
+ exports.jsonObject = _json.jsonObject
89
+ exports.jsonArray = _json.jsonArray
package/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
- export { define } from './Decoder.mjs';
2
- export { always, constant, hardcoded, maybe, mixed, nullable, null_, optional, undefined_, unknown } from './lib/basics.mjs';
3
- export { array, nonEmptyArray, poja, set, tuple } from './lib/arrays.mjs';
4
- export { boolean, numericBoolean, truthy } from './lib/booleans.mjs';
5
- export { date, iso8601 } from './lib/dates.mjs';
6
- export { dict, exact, inexact, mapping, object, pojo } from './lib/objects.mjs';
7
- export { either, oneOf, taggedUnion } from './lib/unions.mjs';
8
- export { email, httpsUrl, nonEmptyString, regex, string, url, uuid, uuidv1, uuidv4 } from './lib/strings.mjs';
9
- export { fail, instanceOf, lazy, never, prep } from './lib/utilities.mjs';
10
- export { anyNumber, integer, number, positiveInteger, positiveNumber } from './lib/numbers.mjs';
11
- export { json, jsonObject, jsonArray } from './lib/json.mjs';
1
+ export { define } from './Decoder.mjs'
2
+ export { always, constant, hardcoded, maybe, mixed, nullable, null_, optional, undefined_, unknown } from './lib/basics.mjs'
3
+ export { array, nonEmptyArray, poja, set, tuple } from './lib/arrays.mjs'
4
+ export { boolean, numericBoolean, truthy } from './lib/booleans.mjs'
5
+ export { date, iso8601 } from './lib/dates.mjs'
6
+ export { dict, exact, inexact, mapping, object, pojo } from './lib/objects.mjs'
7
+ export { either, oneOf, taggedUnion } from './lib/unions.mjs'
8
+ export { email, httpsUrl, nonEmptyString, regex, string, url, uuid, uuidv1, uuidv4 } from './lib/strings.mjs'
9
+ export { fail, instanceOf, lazy, never, prep } from './lib/utilities.mjs'
10
+ export { anyNumber, integer, number, positiveInteger, positiveNumber } from './lib/numbers.mjs'
11
+ export { json, jsonObject, jsonArray } from './lib/json.mjs'
package/lib/arrays.js CHANGED
@@ -1,139 +1,97 @@
1
- "use strict";
1
+ 'use strict'
2
2
 
3
- exports.__esModule = true;
4
- exports.array = array;
5
- exports.nonEmptyArray = nonEmptyArray;
6
- exports.poja = void 0;
7
- exports.set = set;
8
- exports.tuple = void 0;
3
+ exports.__esModule = true
4
+ exports.array = array
5
+ exports.nonEmptyArray = nonEmptyArray
6
+ exports.poja = void 0
7
+ exports.set = set
8
+ exports.tuple = void 0
9
9
 
10
- var _annotate = require("../annotate");
10
+ var _annotate = require('../annotate')
11
11
 
12
- var _Decoder = require("../Decoder");
12
+ var _Decoder = require('../Decoder')
13
13
 
14
- /**
15
- * Accepts any array, but doesn't validate its items further.
16
- *
17
- * "poja" means "plain old JavaScript array", a play on `pojo()`.
18
- */
19
14
  var poja = (0, _Decoder.define)(function (blob, ok, err) {
20
15
  if (!Array.isArray(blob)) {
21
- return err('Must be an array');
16
+ return err('Must be an array')
22
17
  }
23
18
 
24
- return ok( // NOTE: Since Flow 0.98, Array.isArray() returns $ReadOnlyArray<mixed>
25
- // instead of Array<mixed>. For rationale, see
26
- // https://github.com/facebook/flow/issues/7684. In this case, we
27
- // don't want to output read-only types because it's up to the user of
28
- // decoders to determine what they want to do with the decoded output.
29
- // If they want to write items into the array, that's fine!
30
- // The fastest way to turn a read-only array into a normal array in
31
- // Javascript is to use .slice() on it, see this benchmark:
32
- // http://jsben.ch/lO6C5
33
- blob.slice());
34
- });
35
- /**
36
- * Given an array of Result instances, loop over them all and return:
37
- * - An [index, err] tuple, indicating the (index of the) first Err instance
38
- * encountered; or
39
- * - a new Ok with an array of all unwrapped Ok'ed values
40
- */
41
-
42
- exports.poja = poja;
43
-
44
- function all(items, blobs, // TODO: Make this less ugly
45
- ok, err) {
46
- var results = [];
19
+ return ok(blob.slice())
20
+ })
21
+
22
+ exports.poja = poja
23
+
24
+ function all(items, blobs, ok, err) {
25
+ var results = []
47
26
 
48
27
  for (var index = 0; index < items.length; ++index) {
49
- var result = items[index];
28
+ var result = items[index]
50
29
 
51
30
  if (result.ok) {
52
- results.push(result.value);
31
+ results.push(result.value)
53
32
  } else {
54
- var ann = result.error; // Rewrite the annotation to include the index information, and inject it into the original blob
33
+ var ann = result.error
55
34
 
56
- var clone = [].concat(blobs);
57
- clone.splice(index, 1, (0, _annotate.annotate)(ann, ann.text ? ann.text + " (at index " + index + ")" : "index " + index));
58
- return err((0, _annotate.annotate)(clone));
35
+ var clone = [].concat(blobs)
36
+ clone.splice(index, 1, (0, _annotate.annotate)(ann, ann.text ? ann.text + ' (at index ' + index + ')' : 'index ' + index))
37
+ return err((0, _annotate.annotate)(clone))
59
38
  }
60
39
  }
61
40
 
62
- return ok(results);
41
+ return ok(results)
63
42
  }
64
- /**
65
- * Accepts arrays of whatever the given decoder accepts.
66
- */
67
-
68
43
 
69
44
  function array(decoder) {
70
45
  return poja.then(function (blobs, ok, err) {
71
- var results = blobs.map(decoder.decode);
72
- return all(results, blobs, ok, err);
73
- });
46
+ var results = blobs.map(decoder.decode)
47
+ return all(results, blobs, ok, err)
48
+ })
74
49
  }
75
- /**
76
- * Like `array()`, but will reject arrays with 0 elements.
77
- */
78
-
79
50
 
80
51
  function nonEmptyArray(decoder) {
81
52
  return array(decoder).refine(function (arr) {
82
- return arr.length > 0;
83
- }, 'Must be non-empty array');
53
+ return arr.length > 0
54
+ }, 'Must be non-empty array')
84
55
  }
85
- /**
86
- * Similar to `array()`, but returns the result as an [ES6
87
- * Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set).
88
- */
89
-
90
56
 
91
57
  function set(decoder) {
92
58
  return array(decoder).transform(function (items) {
93
- return new Set(items);
94
- });
59
+ return new Set(items)
60
+ })
95
61
  }
96
62
 
97
63
  var ntuple = function ntuple(n) {
98
64
  return poja.refine(function (arr) {
99
- return arr.length === n;
100
- }, "Must be a " + n + "-tuple");
101
- }; // prettier-ignore
102
-
65
+ return arr.length === n
66
+ }, 'Must be a ' + n + '-tuple')
67
+ }
103
68
 
104
69
  function _tuple() {
105
70
  for (var _len = arguments.length, decoders = new Array(_len), _key = 0; _key < _len; _key++) {
106
- decoders[_key] = arguments[_key];
71
+ decoders[_key] = arguments[_key]
107
72
  }
108
73
 
109
74
  return ntuple(decoders.length).then(function (blobs, ok, err) {
110
- var allOk = true;
75
+ var allOk = true
111
76
  var rvs = decoders.map(function (decoder, i) {
112
- var blob = blobs[i];
113
- var result = decoder.decode(blob);
77
+ var blob = blobs[i]
78
+ var result = decoder.decode(blob)
114
79
 
115
80
  if (result.ok) {
116
- return result.value;
81
+ return result.value
117
82
  } else {
118
- allOk = false;
119
- return result.error;
83
+ allOk = false
84
+ return result.error
120
85
  }
121
- });
86
+ })
122
87
 
123
88
  if (allOk) {
124
- return ok(rvs);
89
+ return ok(rvs)
125
90
  } else {
126
- // If a decoder error has happened while unwrapping all the
127
- // results, try to construct a good error message
128
- return err((0, _annotate.annotate)(rvs));
91
+ return err((0, _annotate.annotate)(rvs))
129
92
  }
130
- });
93
+ })
131
94
  }
132
- /**
133
- * Accepts a tuple (an array with exactly _n_ items) of values accepted by the
134
- * _n_ given decoders.
135
- */
136
-
137
95
 
138
- var tuple = _tuple;
139
- exports.tuple = tuple;
96
+ var tuple = _tuple
97
+ exports.tuple = tuple