source: trip-planner-front/node_modules/setprototypeof/index.js@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 384 bytes
Line 
1'use strict'
2/* eslint no-proto: 0 */
3module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties)
4
5function setProtoOf (obj, proto) {
6 obj.__proto__ = proto
7 return obj
8}
9
10function mixinProperties (obj, proto) {
11 for (var prop in proto) {
12 if (!obj.hasOwnProperty(prop)) {
13 obj[prop] = proto[prop]
14 }
15 }
16 return obj
17}
Note: See TracBrowser for help on using the repository browser.