You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
237 B
JavaScript
12 lines
237 B
JavaScript
8 years ago
|
import assert from 'assert'
|
||
|
import cheerio from 'cheerio'
|
||
|
|
||
|
export function clean(string) {
|
||
|
return string.trim().replace(/\r?\n|\r/g, '').replace(/\s+/g, ' ')
|
||
|
}
|
||
|
|
||
|
export function assertClean(a, b) {
|
||
|
assert.equal(clean(a), clean(b))
|
||
|
}
|
||
|
|