import { Predicate } from "@siteimprove/alfa-predicate" ; import { Name } from "../../name" ; const { equals } = Predicate ; public export function hasValue ( predicate ) ; public export function hasValue ( value , ... rest ) ; export function hasValue ( valueOrPredicate , ... values ) { let predicate ; if ( typeof valueOrPredicate === "function" ) { predicate = valueOrPredicate ; } else { predicate = equals ( valueOrPredicate , ... values ) ; } return ( name ) => predicate ( name . value ) ; }