source: imaps-frontend/node_modules/core-js/modules/web.url-search-params.size.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 713 bytes
Line 
1'use strict';
2var DESCRIPTORS = require('../internals/descriptors');
3var uncurryThis = require('../internals/function-uncurry-this');
4var defineBuiltInAccessor = require('../internals/define-built-in-accessor');
5
6var URLSearchParamsPrototype = URLSearchParams.prototype;
7var forEach = uncurryThis(URLSearchParamsPrototype.forEach);
8
9// `URLSearchParams.prototype.size` getter
10// https://github.com/whatwg/url/pull/734
11if (DESCRIPTORS && !('size' in URLSearchParamsPrototype)) {
12 defineBuiltInAccessor(URLSearchParamsPrototype, 'size', {
13 get: function size() {
14 var count = 0;
15 forEach(this, function () { count++; });
16 return count;
17 },
18 configurable: true,
19 enumerable: true
20 });
21}
Note: See TracBrowser for help on using the repository browser.