Add README

This commit is contained in:
Dan Rosén 2018-02-28 10:30:39 +01:00
parent 07020b8e00
commit a1ebc06a20
3 changed files with 133 additions and 2 deletions

14
test/hasFoo.ts Normal file
View file

@ -0,0 +1,14 @@
/** Does this string contain foo, ignoring case?
hasFoo('___foo__') // => true
hasFoo(' fOO ') // => true
hasFoo('Foo.') // => true
hasFoo('bar') // => false
hasFoo('fo') // => false
hasFoo('oo') // => false
*/
function hasFoo(s: string): boolean {
return null != s.match(/foo/)
}