PageSourceSearch

https://www.unmsm.edu.pe/js/global.js

js unmsm.edu.pe collected 2026-10-01 10:21:02 UTC 1,302 bytes, 40 lines download raw bytes

1export const url_api = '/pagina_unmsm/api/v1';
2// export const url_api = "https://www.unmsm.edu.pe/pagina_unmsm/api/v1";
3export const url_imagen =
4	'https://luiscavibotsample.s3-sa-east-1.amazonaws.com/assets';
5// export const url_api_2 = `https://biologiaadmin.unmsm.edu.pe`;
6export const url_api_2 = `https://cm.unmsm.edu.pe/api`;
7// export const url_api_2 = `http://localhost:1337/api`;
8export const url_dominiopublico = `https://www.unmsm.edu.pe`;
9
10const escaparAtributoHtml = (valor) =>
11	String(valor ?? '').replace(
12		/[&<>"']/g,
13		(caracter) =>
14			({
15				'&': '&amp;',
16				'<': '&lt;',
17				'>': '&gt;',
18				'"': '&quot;',
19				"'": '&#039;',
20			})[caracter]
21	);
22
23export const crearImagenCarrera = ({ archivo, directorio, clases, alt }) => {
24	const imagen = String(archivo ?? '').trim();
25	const clasesSeguras = escaparAtributoHtml(clases);
26	const altSeguro = escaparAtributoHtml(alt);
27
28	if (/^https?:\/\//i.test(imagen)) {
29		return `<img class="${clasesSeguras}" src="${escaparAtributoHtml(imagen)}" alt="${altSeguro}">`;
30	}
31
32	const rutaBase = `${directorio}${imagen}`;
33	return `
34		<picture>
35			<source type="image/webp" srcset="${rutaBase}.webp">
36			<source type="image/png" srcset="${rutaBase}.png">
37			<img class="${clasesSeguras}" src="${rutaBase}.png" alt="${altSeguro}">
38		</picture>
39	`;
40};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.