• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / deck.gl / 23850966864

01 Apr 2026 01:26PM UTC coverage: 80.359% (+0.02%) from 80.339%
23850966864

push

github

web-flow
chore(json): Typing improvements (#9641)

3097 of 3743 branches covered (82.74%)

Branch coverage included in aggregate %.

49 of 54 new or added lines in 11 files covered. (90.74%)

14189 of 17768 relevant lines covered (79.86%)

26688.94 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.0
/modules/json/src/helpers/execute-function.ts
1
// deck.gl
2
// SPDX-License-Identifier: MIT
3
// Copyright (c) vis.gl contributors
4

5
import {type JSONConfiguration} from '../json-configuration';
6

7
/**
8
 * Executes a configured JSON function reference.
9
 * @param targetFunction Function name resolved from JSON.
10
 * @param props Props passed to the configured function.
11
 * @param configuration Active conversion configuration.
12
 * @returns The function result, or `null` if the function is not registered.
13
 */
14
export function executeFunction(
15
  targetFunction: string,
16
  props: Record<string, unknown>,
17
  configuration: JSONConfiguration
18
) {
19
  // Find the function
20
  const matchedFunction = configuration.config.functions[targetFunction];
3✔
21

22
  // Check that the function is in the configuration.
23
  if (!matchedFunction) {
3✔
NEW
24
    const {log} = configuration.config; // eslint-disable-line
×
25
    if (log) {
×
26
      const stringProps = JSON.stringify(props, null, 0).slice(0, 40);
×
27
      log.warn(`JSON converter: No registered function ${targetFunction}(${stringProps}...)  `);
×
28
    }
29
    return null;
×
30
  }
31

32
  return matchedFunction(props);
3✔
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc