Source: escape-hod-identifier.js

/*
 * Copyright 2013-2017 Hewlett Packard Enterprise Development Company, L.P.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 */

/**
 * @module js-whatever/js/escape-hod-identifier
 */
define(function() {
    'use strict';

    var regExp = /([\\:])/g;

    //noinspection UnnecessaryLocalVariableJS
    /**
     * @alias module:js-whatever/js/escape-hod-identifier
     * @desc Escape colons in HOD identifiers. HOD identifiers (domain names, application names, index names etc) can be
     * concatenated with colons. In these cases, : must become \: and \ must become \\.
     * @param {string} input The input string
     * @return {string} The escaped string
     */
    function escapeHodIdentifier(input) {
        return input.replace(regExp, '\\$&');
    }

    return escapeHodIdentifier;
});
Copyright 2013-2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Thu Jun 21st 18:04 2018 using the DocStrap template.