UNPKG

@crowdin/app-project-module

Version:

Module that generates for you all common endpoints for serving standalone Crowdin App

17 lines (16 loc) 509 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveInstanceKey = resolveInstanceKey; const index_1 = require("./index"); function resolveInstanceKey({ identifier, suffix, item, index, isSingle, }) { if (isSingle) { return identifier + '-' + suffix; } if (item.key) { return item.key; } if (item.name) { return identifier + '-' + (0, index_1.kebabCase)(item.name); } return identifier + '-' + suffix + '-' + index; }