JAVASCRIPT   36

copy.js

Guest on 9th June 2021 04:20:05 AM

  1. 'use strict';
  2.  
  3. var toArray = require('es5-ext/array/to-array')
  4.   , Set     = require('../../');
  5.  
  6. module.exports = function (t, a) {
  7.       var content = ['raz', 2, true], set = new Set(content), copy;
  8.  
  9.       copy = t.call(set);
  10.       a.not(copy, set, "Copy");
  11.       a.deep(toArray(copy), content, "Content");
  12. };

Raw Paste


Login or Register to edit or fork this paste. It's free.