PHP 8.2.30
Preview: index.js Size: 288 B
/opt/alt/alt-nodejs14/root/lib/node_modules/npm/node_modules/prepend-http/index.js

'use strict';
module.exports = function (url) {
	if (typeof url !== 'string') {
		throw new TypeError('Expected a string, got ' + typeof url);
	}

	url = url.trim();

	if (/^\.*\/|^(?!localhost)\w+:/.test(url)) {
		return url;
	}

	return url.replace(/^(?!(?:\w+:)?\/\/)/, 'http://');
};

Directory Contents

Dirs: 0 × Files: 4

Name Size Perms Modified Actions
288 B lrw-r--r-- 2026-02-22 20:40:38
Edit Download
1.09 KB lrw-r--r-- 2026-02-22 20:40:38
Edit Download
1.58 KB lrw-r--r-- 2026-02-22 20:40:38
Edit Download
577 B lrw-r--r-- 2026-02-22 20:40:38
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).