UNPKG

@boomerang-io/carbon-addons-boomerang-react

Version:
28 lines (24 loc) 630 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /* IBM Confidential 694970X, 69497O0 © Copyright IBM Corp. 2022, 2024 */ /** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ /** * Generic utility to initialize a method that will return a unique instance id * for a component. */ function setupGetInstanceId() { let instanceId = 0; return function getInstanceId() { return ++instanceId; }; } exports.default = setupGetInstanceId;