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
export default class FormErrors { | |
errors = [] | |
constructor(errors = []) { | |
this.errors = errors | |
} | |
/** | |
* Returns the first message from key | |
* |
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
const editDistance = (s1, s2) => { | |
s1 = s1.toLowerCase(); | |
s2 = s2.toLowerCase(); | |
const costs = []; | |
for (let i = 0; i <= s1.length; i++) { | |
let lastValue = i; | |
for (let j = 0; j <= s2.length; j++) { |
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
<?php | |
/** | |
* Created by PhpStorm. | |
* User: danielcastro | |
* Date: 2/2/17 | |
* Time: 2:06 PM | |
* | |
* Place under app/paht/to/file folder and add | |
* "files" : [ | |
* "app/paht/to/file/helpers.php" |