16 lines
408 B
JavaScript
16 lines
408 B
JavaScript
const { Glib } = require('../../lib');
|
|
|
|
module.exports = {
|
|
'1': (input) =>
|
|
Glib.fromLines(input).filter(
|
|
(string) =>
|
|
!string.match(/(ab|cd|pq|xy)/) &&
|
|
string.match(/[aeiou].*[aeiou].*[aeiou]/) &&
|
|
string.match(/(.)\1/),
|
|
).length,
|
|
'2': (input) =>
|
|
Glib.fromLines(input).filter(
|
|
(string) => string.match(/(..).*\1/) && string.match(/(.).\1/),
|
|
).length,
|
|
};
|