This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm init | |
$ npm install nexmo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"action": "stream", | |
"streamUrl": [ | |
"https://cdn.glitch.com/079cc071-4677-4893-bdb7-7b3f525ed26e%2Fcall-me-maybe-short.mp3?1550887955998" | |
] | |
}, | |
{ | |
"action": "conversation", | |
"name": "sbh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"action":"connect", | |
"from":"442038973497", | |
"endpoint":[{ | |
"type":"phone", | |
"number":"447481738558" | |
}] | |
} | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var kb = require("ble_hid_keyboard"); | |
NRF.setServices(undefined, { hid : kb.report }); | |
var reset_timer; | |
var next = "n"; | |
var prev = "p"; | |
function sendCharNext(){ | |
if (next == next.toLowerCase()){ | |
sk = 0; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Router tests', () => { | |
//setup | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [ | |
RouterTestingModule.withRoutes(routes), | |
AppModule | |
] | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Pipe: CapitalisePipe', () => { | |
let pipe; | |
//setup | |
beforeEach(() => TestBed.configureTestingModule({ | |
providers: [ CapitalisePipe ] | |
})); | |
beforeEach(inject([CapitalisePipe], p => { | |
pipe = p; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Pipe, PipeTransform} from '@angular/core'; | |
@Pipe({ | |
name: 'capitalise' | |
}) | |
export class CapitalisePipe implements PipeTransform { | |
transform(value: string): string { | |
if (typeof value !== 'string') { | |
throw new Error('Requires a String as input'); | |
} | |
return value.toUpperCase(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('MockBackend: LanguagesServiceHttp', () => { | |
let mockbackend, service; | |
//setup | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
imports: [ HttpModule ], | |
providers: [ | |
LanguagesServiceHttp, | |
{ provide: XHRBackend, useClass: MockBackend } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Service: LanguagesServiceHttp', () => { | |
let service; | |
//setup | |
beforeEach(() => TestBed.configureTestingModule({ | |
imports: [ HttpModule ], | |
providers: [ LanguagesServiceHttp ] | |
})); | |
beforeEach(inject([LanguagesServiceHttp], s => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class LanguagesServiceHttp { | |
constructor(private http:Http) { } | |
get(){ | |
return this.http.get('api/languages.json') | |
.map(response => response.json()); | |
} | |
} |