How to use the construct function from ramda

Find comprehensive JavaScript ramda.construct code examples handpicked from public code repositorys.

1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
*      };
*      Animal.prototype.sighting = function() {
*        return "It's a " + this.kind + "!";
*      }
*
*      const AnimalConstructor = R.construct(Animal)
*
*      // Notice we no longer need the 'new' keyword:
*      AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}};
*
fork icon0
star icon0
watch icon2

+ 7 other calls in file

Other functions in ramda

Sorted by popularity

function icon

ramda.clone is the most popular function in ramda (30311 examples)