MCPcopy Create free account
hub / github.com/parse-community/parse-server / isPushIncrementing

Function isPushIncrementing

src/Push/utils.js:4–20  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

2
3
4export function isPushIncrementing(body) {
5 if (!body.data || !body.data.badge) {
6 return false;
7 }
8
9 const badge = body.data.badge;
10 if (typeof badge == 'string' && badge.toLowerCase() == 'increment') {
11 return true;
12 }
13
14 return (
15 typeof badge == 'object' &&
16 typeof badge.__op == 'string' &&
17 badge.__op.toLowerCase() == 'increment' &&
18 Number(badge.amount)
19 );
20}
21
22const localizableKeys = ['alert', 'title'];
23

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…