Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

22 linhas
472 B

  1. 'use strict';
  2. /**
  3. * Copyright (c) 2013-present, Facebook, Inc.
  4. *
  5. * This source code is licensed under the MIT license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. *
  8. *
  9. */
  10. var Set = require('./Set');
  11. /**
  12. * Returns the distinct elements of an iterable. The result is an array whose
  13. * elements are ordered by first occurrence.
  14. */
  15. function distinctArray(xs) {
  16. return Array.from(new Set(xs).values());
  17. }
  18. module.exports = distinctArray;