bindPrototype.js 193 B

123456789
  1. export default (list, target) => {
  2. const { prototype } = target
  3. const len = list.length
  4. for (let i = 0; i < len; i++) {
  5. Object.setPrototypeOf(list[i], prototype)
  6. }
  7. return list
  8. }