UNPKG

@jbrowse/core

Version:

JBrowse 2 core libraries used by plugins

13 lines (12 loc) 418 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatFastaLines = formatFastaLines; exports.formatSeqFasta = formatSeqFasta; function formatFastaLines(seqString) { return seqString.replaceAll(/(.{1,80})/g, '$1\n').trimEnd(); } function formatSeqFasta(chunks) { return chunks .map(chunk => `>${chunk.header}\n${formatFastaLines(chunk.seq)}`) .join('\n'); }