PageSourceSearch

https://panel.andyapp.io/js/utils.js?3.14.2

js andyapp.io collected 2026-10-04 11:05:15 UTC 1,396 bytes, 49 lines download raw bytes

1// receives an array of ids and an array of objects,
2// from the list of objects, returns only the objects whose ids are present in the array of ids
3function getObjectsByIds(listOfIds, listOfObjects) {
4    if (!listOfIds || !listOfObjects) {
5        // logError('There is a missing param on getObjectsByIds')
6        return
7    }
8
9    const filteredListOfObjects = listOfObjects.filter((obj) => listOfIds.includes(obj.id))
10
11    return filteredListOfObjects
12}
13
14function getObjectsByValues(listOfValues, listOfObjects) {
15    if (!listOfValues || !listOfObjects) {
16        // logError('There is a missing param on getObjectsByIds')
17        return
18    }
19
20    const filteredListOfObjects = listOfObjects.filter((obj) => listOfValues.includes(obj.value))
21
22    return filteredListOfObjects
23}
24
25function getListOfIds(listOfObjects) {
26    if (!listOfObjects) {
27        logError('No params for getListOfIds')
28        return
29    }
30
31    const idsList = listOfObjects.map((obj) => {
32        if (typeof obj === 'object' && obj !== null && obj.hasOwnProperty('id')) {
33            return obj.id
34        }
35    })
36
37    return idsList
38}
39
40function isTimestampInSeconds(input) {
41    if (!Number.isInteger(Number(input))) {
42        return false
43    }
44    const timestamp = Number(input)
45    const minTimestamp = 0
46    const maxTimestamp = 4102444800
47
48    return timestamp >= minTimestamp && timestamp <= maxTimestamp
49}

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.