lib/cpu/opcodes.js
function (cpu, mmu, cc) {
    if (cc) {
        cpu.pc += 2 + mmu.readByte(cpu.pc + 1).signed();
        return 12;
    }
    cpu.pc += 2;

    return 8;
}
function (cpu, mmu, cc) {
    if (cc) {
        cpu.pc += 2 + mmu.readByte(cpu.pc + 1).signed();
        return 12;
    }
    cpu.pc += 2;

    return 8;
}
function ( cpu , mmu , cc ) { if ( cc ) { cpu . pc += 2 + mmu . readByte ( cpu . pc + 1 ) . signed ( ) ; return 12 ; } cpu . pc += 2 ; return 8 ; }
JR cc,n

Description:
If following condition is true then add n address and jump to it:

Use with:
n = one byte signed immediate value
cc = NZ, Jump if Z flag is reset.
cc = Z, Jump if Z flag is set.
cc = NC, Jump if C flag is reset.
cc = C, Jump if C flag is set.

Opcodes:
Instruction    Parameters    Opcode    Cycles
JR             NZ,*          20        8
JR             Z,*           28        8
JR             NC,*          30        8
JR             C,*           38        8
JR cc n