deno.land / x / rambda@v9.1.1 / source / remove-spec.ts

remove-spec.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import {remove} from 'rambda'
const text = 'foo bar baz foo'
describe('R.remove', () => { it('with array of patterns', () => { const inputs = [/foo/, /not\shere/, /also/, 'bar']
const result = remove(inputs, text) const curriedResult = remove(inputs)(text)
result // $ExpectType string curriedResult // $ExpectType string }) it('with single pattern - string', () => { const result = remove('foo', text) const curriedResult = remove('foo')(text)
result // $ExpectType string curriedResult // $ExpectType string })
it('with single pattern - regular expression', () => { const result = remove('foo', text) const curriedResult = remove(/foo/g)(text)
result // $ExpectType string curriedResult // $ExpectType string })})
rambda

Version Info

Tagged at
2 months ago