main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
702 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var $ = require('../internals/export');
|
---|
| 3 | var fromAsync = require('../internals/array-from-async');
|
---|
| 4 | var fails = require('../internals/fails');
|
---|
| 5 |
|
---|
| 6 | // eslint-disable-next-line es/no-nonstandard-array-properties -- safe
|
---|
| 7 | var nativeFromAsync = Array.fromAsync;
|
---|
| 8 | // https://bugs.webkit.org/show_bug.cgi?id=271703
|
---|
| 9 | var INCORRECT_CONSTRUCTURING = !nativeFromAsync || fails(function () {
|
---|
| 10 | var counter = 0;
|
---|
| 11 | nativeFromAsync.call(function () {
|
---|
| 12 | counter++;
|
---|
| 13 | return [];
|
---|
| 14 | }, { length: 0 });
|
---|
| 15 | return counter !== 1;
|
---|
| 16 | });
|
---|
| 17 |
|
---|
| 18 | // `Array.fromAsync` method
|
---|
| 19 | // https://github.com/tc39/proposal-array-from-async
|
---|
| 20 | $({ target: 'Array', stat: true, forced: INCORRECT_CONSTRUCTURING }, {
|
---|
| 21 | fromAsync: fromAsync
|
---|
| 22 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.