PageSourceSearch

https://playsout.com/games/Flappy%20Parrot/js/score.js

js playsout.com collected 2026-09-24 10:51:20 UTC 680 bytes, 28 lines download raw bytes

1export const SCORE_KEY = 'playhouse.flappy-parrot.best';
2
3export function readBest(storage) {
4  try {
5    const db = storage ?? globalThis.localStorage;
6    const raw = db?.getItem(SCORE_KEY);
7    if (raw == null) return 0;
8    const n = Number(raw);
9    return Number.isFinite(n) ? n : 0;
10  } catch {
11    return 0;
12  }
13}
14
15export function writeBest(storage, value) {
16  try {
17    const db = storage ?? globalThis.localStorage;
18    db.setItem(SCORE_KEY, String(value));
19    return true;
20  } catch {
21    return false;
22  }
23}
24
25export function submitBest(storage, value) {
26  if (!Number.isFinite(value) || value <= readBest(storage)) return false;
27  return writeBest(storage, value);
28}

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.