- 'use strict';
-
- try {
- const isValidUTF8 = require('utf-8-validate');
-
- exports.isValidUTF8 =
- typeof isValidUTF8 === 'object'
- ? isValidUTF8.Validation.isValidUTF8
- : isValidUTF8;
- } catch (e) {
- exports.isValidUTF8 = () => true;
- }
-
-
- exports.isValidStatusCode = (code) => {
- return (
- (code >= 1000 &&
- code <= 1014 &&
- code !== 1004 &&
- code !== 1005 &&
- code !== 1006) ||
- (code >= 3000 && code <= 4999)
- );
- };
|