We provide a method for constructing a class of multivariate copulas depending on a univariate function. We study some properties of this class and present several examples. The same circle of ideas is used in a similar construction of quasi–copulas.