antsibull-docs
Version:
TypeScript library for processing Ansible documentation markup
17 lines • 813 B
JavaScript
;
/*
Simplified BSD License (see LICENSES/BSD-2-Clause.txt or https://opensource.org/licenses/BSD-2-Clause)
SPDX-FileCopyrightText: Ansible Project
SPDX-License-Identifier: BSD-2-Clause
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isFQCN = isFQCN;
exports.isPluginType = isPluginType;
function isFQCN(input) {
return input.match(/^[A-Za-z0-9_]+\.[A-Za-z0-9_]+(?:\.[A-Za-z0-9_]+)+$/) !== null;
}
function isPluginType(input) {
/* We do not want to hard-code a list of valid plugin types that might be inaccurate, so we simply check whether this is a valid kind of Python identifier usually used for plugin types. If ansible-core ever adds one with digits, we'll have to update this. */
return /^[a-z_]+$/.test(input);
}
//# sourceMappingURL=ansible.js.map