UNPKG

@lynx-js/web-core

Version:

This is an internal experimental package, do not use

14 lines 625 B
// Copyright 2023 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. import { getCustomSectionsEndpoint } from '../../../endpoints.js'; export function createGetCustomSection(rpc, customSections) { const getCustomSections = rpc.createCall(getCustomSectionsEndpoint); return (key, callback) => { if (customSections[key]) { return callback(customSections[key]); } getCustomSections(key).then(callback); }; } //# sourceMappingURL=createGetCustomSection.js.map