How to use the optionalFinite function from assert-plus
Find comprehensive JavaScript assert-plus.optionalFinite code examples handpicked from public code repositorys.
1851 1852 1853 1854 1855 1856 1857 1858 1859
if (typeof (opts) === 'function') { cb = opts; opts = {}; } assert.object(opts, 'options'); assert.optionalFinite(opts.size, 'options.size'); assert.func(cb, 'callback'); input.pause();
41
75
0
+ 7 other calls in file
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116
// Return the MPU upload path for a given upload ID. // Optionally also append a part number, if given. function mpuUploadPath(accountLogin, uploadId, partNum) { assert.string(accountLogin, 'accountLogin'); assert.uuid(uploadId, 'uploadId'); assert.optionalFinite(partNum, 'partNum'); var c; var len; var p;
16
13
34
113 114 115 116 117 118 119 120 121 122
if (options.headers === undefined) { options.headers = [request.headers['x-date'] ? 'x-date' : 'date']; } assert.object(options, 'options'); assert.arrayOfString(options.headers, 'options.headers'); assert.optionalFinite(options.clockSkew, 'options.clockSkew'); var authzHeaderName = options.authorizationHeaderName || 'authorization'; if (!request.headers[authzHeaderName]) {
1
0
0
assert-plus.object is the most popular function in assert-plus (2295 examples)