Sha256: 2c6330ca1513cc7e888cc64a8e85e3049c929c06acd6ced458fa5f35c53f515d
Contents?: true
Size: 432 Bytes
Versions: 295
Compression:
Stored size: 432 Bytes
Contents
class Transcriptor { toRna(input: string): string { const dictionary: {[key: string]: string } = { G: "C" , C: "G" , T: "A" , A: "U" } let temp = "" input.split("").forEach((element) => { const current = dictionary[element] if (current === undefined) { throw new Error('Invalid input DNA.')} temp += current }) return temp } } export default Transcriptor
Version data entries
295 entries across 295 versions & 1 rubygems