Server IP : 162.213.251.212 / Your IP : 3.129.23.166 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/allssztx/www/easybuyer/node_modules/compressible/ |
Upload File : |
/*! * compressible * Copyright(c) 2013 Jonathan Ong * Copyright(c) 2014 Jeremiah Senkpiel * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ 'use strict' /** * Module dependencies. * @private */ var db = require('mime-db') /** * Module variables. * @private */ var COMPRESSIBLE_TYPE_REGEXP = /^text\/|\+(?:json|text|xml)$/i var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ /** * Module exports. * @public */ module.exports = compressible /** * Checks if a type is compressible. * * @param {string} type * @return {Boolean} compressible * @public */ function compressible (type) { if (!type || typeof type !== 'string') { return false } // strip parameters var match = EXTRACT_TYPE_REGEXP.exec(type) var mime = match && match[1].toLowerCase() var data = db[mime] // return database information if (data && data.compressible !== undefined) { return data.compressible } // fallback to regexp or unknown return COMPRESSIBLE_TYPE_REGEXP.test(mime) || undefined }