Public
Script
1
2
3
4
5
6
7
import { animals, colors } from "npm:unique-names-generator";
export default (name: string) => {
const splitName = name.replace(/([A-Z])/g, " $1").toLowerCase().trim().split(" ");
return splitName.length === 2 && colors.includes(splitName[0])
&& animals.includes(splitName[1]);
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
July 3, 2024