UNPKG

barbells

Version:

[//]: # ( ns__file unit: standard, comp: README.md )

14 lines (13 loc) 599 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.expandNsAbbreviations = void 0; const { regExTemplateAbbreviation } = require('magicalstrings').constants.Regex.regExTemplateAbbreviation; const { placeholders } = require('magicalstrings').constants; function expandNsAbbreviations(template) { return template .replace(regExTemplateAbbreviation, '{{$1 \'$2\'}}') .replace('{{nsFile}}', placeholders.OPEN_COMMENT + ' ns__file {{fileInfo}} ' + placeholders.CLOSE_COMMENT); } exports.expandNsAbbreviations = expandNsAbbreviations;