- Updated tests for this change.
- Tested the changes locally.
This file contains 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 React, { Component } from 'react'; | |
import './App.css'; | |
import annyang from './Annyang' | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
players: [ | |
{ |
This file contains 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 annyang from 'annyang' | |
class Annyang { | |
// 1 | |
isSupported() { | |
return annyang !== null | |
} | |
// 2 | |
start() { |
This file contains 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
body { | |
margin: 0; | |
padding: 0; | |
font-family: sans-serif; | |
} | |
.score-container { | |
display: flex; | |
align-items: center; | |
text-align: center; |
This file contains 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 React, { Component } from 'react'; | |
import './App.css'; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
players: [ | |
{ | |
name: 'Player 1', |
This file contains 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
fun String.pluralize(count: Int): String? { | |
return this.pluralize(count, null) | |
} | |
fun String.pluralize(count: Int, plural: String?): String? { | |
return if (count > 1) { | |
plural ?: this + 's' | |
} else { | |
this | |
} |
NewerOlder