Skip to content

splitPemBlocksOrThrow

Finds all BEGIN/END-delimited PEM blocks in a string and returns them as parsed PemBlock entries. Handles concatenated PEM files and ignores non-PEM text between blocks.

ts
function splitPemBlocksOrThrow(
	input: string,
): readonly PemBlock[]

Parameters

  • input: string

Released under the MIT License.