|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
588 bytes
|
| Line | |
|---|
| 1 | 'use strict';
|
|---|
| 2 |
|
|---|
| 3 | var $defineProperty = require('es-define-property');
|
|---|
| 4 |
|
|---|
| 5 | var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|---|
| 6 | return !!$defineProperty;
|
|---|
| 7 | };
|
|---|
| 8 |
|
|---|
| 9 | hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|---|
| 10 | // node v0.6 has a bug where array lengths can be Set but not Defined
|
|---|
| 11 | if (!$defineProperty) {
|
|---|
| 12 | return null;
|
|---|
| 13 | }
|
|---|
| 14 | try {
|
|---|
| 15 | return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|---|
| 16 | } catch (e) {
|
|---|
| 17 | // In Firefox 4-22, defining length on an array throws an exception.
|
|---|
| 18 | return true;
|
|---|
| 19 | }
|
|---|
| 20 | };
|
|---|
| 21 |
|
|---|
| 22 | module.exports = hasPropertyDescriptors;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.