govuk_publishing_components 16.29.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +46 -23
- data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +8 -2
- data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +101 -21
- data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +9 -2
- data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +4 -6
- data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +36 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +14 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +23 -23
- data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +2 -2
- data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +10 -10
- data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +11 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +14 -14
- data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +7 -7
- data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +20 -16
- data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +4 -4
- data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss +5 -5
- data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +8 -8
- data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +1 -1
- data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +33 -25
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +4 -2
- data/app/views/govuk_publishing_components/components/_notice.html.erb +4 -1
- data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -0
- data/app/views/govuk_publishing_components/components/docs/error_summary.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/notice.yml +6 -0
- data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
- data/lib/govuk_publishing_components/presenters/cookie_banner_helper.rb +0 -4
- data/lib/govuk_publishing_components/version.rb +1 -1
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +1 -1
- data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +1 -1
- data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -1
- data/node_modules/accessible-autocomplete/package.json +3 -3
- data/node_modules/accessible-autocomplete/src/autocomplete.js +4 -2
- data/node_modules/accessible-autocomplete/src/wrapper.js +5 -1
- data/node_modules/d/CHANGELOG.md +9 -0
- data/node_modules/d/CHANGES +4 -0
- data/node_modules/d/LICENSE +12 -16
- data/node_modules/d/README.md +49 -19
- data/node_modules/d/auto-bind.js +11 -10
- data/node_modules/d/index.js +23 -24
- data/node_modules/d/lazy.js +21 -23
- data/node_modules/d/package.json +63 -16
- data/node_modules/d/test/auto-bind.js +6 -7
- data/node_modules/d/test/index.js +78 -51
- data/node_modules/d/test/lazy.js +65 -50
- data/node_modules/es6-weak-map/CHANGELOG.md +5 -0
- data/node_modules/es6-weak-map/LICENSE +12 -16
- data/node_modules/es6-weak-map/README.md +34 -19
- data/node_modules/es6-weak-map/implement.js +9 -5
- data/node_modules/es6-weak-map/index.js +2 -2
- data/node_modules/es6-weak-map/is-implemented.js +10 -9
- data/node_modules/es6-weak-map/is-native-implemented.js +3 -3
- data/node_modules/es6-weak-map/is-weak-map.js +8 -8
- data/node_modules/es6-weak-map/package.json +30 -19
- data/node_modules/es6-weak-map/polyfill.js +31 -32
- data/node_modules/es6-weak-map/test/implement.js +4 -2
- data/node_modules/es6-weak-map/test/index.js +4 -3
- data/node_modules/es6-weak-map/test/is-implemented.js +9 -8
- data/node_modules/es6-weak-map/test/is-native-implemented.js +4 -2
- data/node_modules/es6-weak-map/test/is-weak-map.js +4 -4
- data/node_modules/es6-weak-map/test/polyfill.js +13 -13
- data/node_modules/es6-weak-map/test/valid-weak-map.js +22 -9
- data/node_modules/es6-weak-map/valid-weak-map.js +5 -5
- data/node_modules/resolve/lib/async.js +1 -1
- data/node_modules/resolve/lib/node-modules-paths.js +1 -1
- data/node_modules/resolve/lib/sync.js +0 -2
- data/node_modules/resolve/package.json +13 -13
- data/node_modules/resolve/test/node-modules-paths.js +0 -22
- data/node_modules/resolve/test/resolver.js +11 -0
- data/node_modules/resolve/test/resolver_sync.js +11 -0
- data/node_modules/standard/node_modules/ms/index.js +2 -2
- data/node_modules/standard/node_modules/ms/package.json +205 -16
- data/node_modules/standard/node_modules/ms/readme.md +1 -1
- data/node_modules/type/CHANGELOG.md +62 -0
- data/node_modules/type/README.md +743 -0
- data/node_modules/type/array-length/coerce.js +10 -0
- data/node_modules/type/array-length/ensure.js +10 -0
- data/node_modules/type/array-like/ensure.js +9 -0
- data/node_modules/type/array-like/is.js +21 -0
- data/node_modules/type/array/ensure.js +9 -0
- data/node_modules/type/array/is.js +27 -0
- data/node_modules/type/date/ensure.js +9 -0
- data/node_modules/type/date/is.js +26 -0
- data/node_modules/type/error/ensure.js +9 -0
- data/node_modules/type/error/is.js +24 -0
- data/node_modules/type/finite/coerce.js +8 -0
- data/node_modules/type/finite/ensure.js +10 -0
- data/node_modules/type/function/ensure.js +9 -0
- data/node_modules/type/function/is.js +19 -0
- data/node_modules/type/integer/coerce.js +11 -0
- data/node_modules/type/integer/ensure.js +10 -0
- data/node_modules/type/iterable/ensure.js +9 -0
- data/node_modules/type/iterable/is.js +20 -0
- data/node_modules/type/lib/is-to-string-tag-supported.js +3 -0
- data/node_modules/type/lib/resolve-exception.js +21 -0
- data/node_modules/type/lib/safe-to-string.js +10 -0
- data/node_modules/type/lib/to-short-string.js +29 -0
- data/node_modules/type/natural-number/coerce.js +10 -0
- data/node_modules/type/natural-number/ensure.js +10 -0
- data/node_modules/type/number/coerce.js +14 -0
- data/node_modules/type/number/ensure.js +10 -0
- data/node_modules/type/object/ensure.js +9 -0
- data/node_modules/type/object/is.js +11 -0
- data/node_modules/type/package.json +159 -0
- data/node_modules/type/plain-function/ensure.js +9 -0
- data/node_modules/type/plain-function/is.js +11 -0
- data/node_modules/type/plain-object/ensure.js +9 -0
- data/node_modules/type/plain-object/is.js +28 -0
- data/node_modules/type/promise/ensure.js +9 -0
- data/node_modules/type/promise/is.js +27 -0
- data/node_modules/type/prototype/is.js +13 -0
- data/node_modules/type/reg-exp/ensure.js +9 -0
- data/node_modules/type/reg-exp/is.js +37 -0
- data/node_modules/type/safe-integer/coerce.js +13 -0
- data/node_modules/type/safe-integer/ensure.js +10 -0
- data/node_modules/type/string/coerce.js +23 -0
- data/node_modules/type/string/ensure.js +10 -0
- data/node_modules/type/test/_lib/arrow-function-if-supported.js +4 -0
- data/node_modules/type/test/_lib/class-if-supported.js +4 -0
- data/node_modules/type/test/array-length/coerce.js +47 -0
- data/node_modules/type/test/array-length/ensure.js +19 -0
- data/node_modules/type/test/array-like/ensure.js +24 -0
- data/node_modules/type/test/array-like/is.js +47 -0
- data/node_modules/type/test/array/ensure.js +20 -0
- data/node_modules/type/test/array/is.js +41 -0
- data/node_modules/type/test/date/ensure.js +20 -0
- data/node_modules/type/test/date/is.js +46 -0
- data/node_modules/type/test/error/ensure.js +20 -0
- data/node_modules/type/test/error/is.js +42 -0
- data/node_modules/type/test/finite/coerce.js +40 -0
- data/node_modules/type/test/finite/ensure.js +17 -0
- data/node_modules/type/test/function/ensure.js +20 -0
- data/node_modules/type/test/function/is.js +46 -0
- data/node_modules/type/test/integer/coerce.js +49 -0
- data/node_modules/type/test/integer/ensure.js +17 -0
- data/node_modules/type/test/iterable/ensure.js +24 -0
- data/node_modules/type/test/iterable/is.js +50 -0
- data/node_modules/type/test/lib/is-to-string-tag-supported.js +10 -0
- data/node_modules/type/test/lib/resolve-exception.js +39 -0
- data/node_modules/type/test/lib/safe-to-string.js +32 -0
- data/node_modules/type/test/lib/to-short-string.js +41 -0
- data/node_modules/type/test/natural-number/coerce.js +47 -0
- data/node_modules/type/test/natural-number/ensure.js +19 -0
- data/node_modules/type/test/number/coerce.js +40 -0
- data/node_modules/type/test/number/ensure.js +17 -0
- data/node_modules/type/test/object/ensure.js +20 -0
- data/node_modules/type/test/object/is.js +30 -0
- data/node_modules/type/test/plain-function/ensure.js +20 -0
- data/node_modules/type/test/plain-function/is.js +56 -0
- data/node_modules/type/test/plain-object/ensure.js +20 -0
- data/node_modules/type/test/plain-object/is.js +47 -0
- data/node_modules/type/test/promise/ensure.js +20 -0
- data/node_modules/type/test/promise/is.js +39 -0
- data/node_modules/type/test/prototype/is.js +39 -0
- data/node_modules/type/test/reg-exp/ensure.js +20 -0
- data/node_modules/type/test/reg-exp/is.js +47 -0
- data/node_modules/type/test/safe-integer/coerce.js +49 -0
- data/node_modules/type/test/safe-integer/ensure.js +19 -0
- data/node_modules/type/test/string/coerce.js +36 -0
- data/node_modules/type/test/string/ensure.js +17 -0
- data/node_modules/type/test/thenable/ensure.js +20 -0
- data/node_modules/type/test/thenable/is.js +44 -0
- data/node_modules/type/test/time-value/coerce.js +47 -0
- data/node_modules/type/test/time-value/ensure.js +17 -0
- data/node_modules/type/test/value/ensure.js +20 -0
- data/node_modules/type/test/value/is.js +29 -0
- data/node_modules/type/thenable/ensure.js +9 -0
- data/node_modules/type/thenable/is.js +9 -0
- data/node_modules/type/time-value/coerce.js +12 -0
- data/node_modules/type/time-value/ensure.js +10 -0
- data/node_modules/type/value/ensure.js +9 -0
- data/node_modules/type/value/is.js +6 -0
- metadata +118 -21
- data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-navigation.scss +0 -94
- data/node_modules/resolve/reaf +0 -0
- data/node_modules/resolve/test/shadowed_core.js +0 -38
- data/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
### [2.0.3](https://github.com/medikoo/es6-weak-map/compare/v2.0.2...v2.0.3) (2019-06-07)
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
ISC License
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
-
in the Software without restriction, including without limitation the rights
|
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
3
|
+
Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
12
8
|
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
OUT OF OR IN CONNECTION WITH THE
|
|
19
|
-
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
14
|
+
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -1,20 +1,27 @@
|
|
|
1
|
+
[![Build status][nix-build-image]][nix-build-url]
|
|
2
|
+
[![Windows status][win-build-image]][win-build-url]
|
|
3
|
+
![Transpilation status][transpilation-image]
|
|
4
|
+
[![npm version][npm-image]][npm-url]
|
|
5
|
+
|
|
1
6
|
# es6-weak-map
|
|
7
|
+
|
|
2
8
|
## WeakMap collection as specified in ECMAScript6
|
|
3
9
|
|
|
4
10
|
_Roughly inspired by Mark Miller's and Kris Kowal's [WeakMap implementation](https://github.com/drses/weak-map)_.
|
|
5
11
|
|
|
6
12
|
Differences are:
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
13
|
+
|
|
14
|
+
- Assumes compliant ES5 environment (no weird ES3 workarounds or hacks)
|
|
15
|
+
- Well modularized CJS style
|
|
16
|
+
- Based on one solution.
|
|
10
17
|
|
|
11
18
|
### Limitations
|
|
12
19
|
|
|
13
|
-
-
|
|
20
|
+
- Will fail on non extensible objects provided as keys
|
|
14
21
|
|
|
15
22
|
### Installation
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
$ npm install es6-weak-map
|
|
18
25
|
|
|
19
26
|
To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: [Browserify](http://browserify.org/), [Webmake](https://github.com/medikoo/modules-webmake) or [Webpack](http://webpack.github.io/)
|
|
20
27
|
|
|
@@ -23,19 +30,19 @@ To port it to Browser or any other (non CJS) environment, use your favorite CJS
|
|
|
23
30
|
If you want to make sure your environment implements `WeakMap`, do:
|
|
24
31
|
|
|
25
32
|
```javascript
|
|
26
|
-
require(
|
|
33
|
+
require("es6-weak-map/implement");
|
|
27
34
|
```
|
|
28
35
|
|
|
29
36
|
If you'd like to use native version when it exists and fallback to polyfill if it doesn't, but without implementing `WeakMap` on global scope, do:
|
|
30
37
|
|
|
31
38
|
```javascript
|
|
32
|
-
var WeakMap = require(
|
|
39
|
+
var WeakMap = require("es6-weak-map");
|
|
33
40
|
```
|
|
34
41
|
|
|
35
42
|
If you strictly want to use polyfill even if native `WeakMap` exists, do:
|
|
36
43
|
|
|
37
44
|
```javascript
|
|
38
|
-
var WeakMap = require(
|
|
45
|
+
var WeakMap = require("es6-weak-map/polyfill");
|
|
39
46
|
```
|
|
40
47
|
|
|
41
48
|
#### API
|
|
@@ -43,21 +50,29 @@ var WeakMap = require('es6-weak-map/polyfill');
|
|
|
43
50
|
Best is to refer to [specification](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-weakmap-objects). Still if you want quick look, follow example:
|
|
44
51
|
|
|
45
52
|
```javascript
|
|
46
|
-
var WeakMap = require(
|
|
53
|
+
var WeakMap = require("es6-weak-map");
|
|
47
54
|
|
|
48
55
|
var map = new WeakMap();
|
|
49
56
|
var obj = {};
|
|
50
57
|
|
|
51
|
-
map.set(obj,
|
|
52
|
-
map.get(obj);
|
|
53
|
-
map.has(obj);
|
|
54
|
-
map.delete(obj);
|
|
55
|
-
map.get(obj);
|
|
56
|
-
map.has(obj);
|
|
57
|
-
map.set(obj,
|
|
58
|
-
map.has(obj);
|
|
58
|
+
map.set(obj, "foo"); // map
|
|
59
|
+
map.get(obj); // 'foo'
|
|
60
|
+
map.has(obj); // true
|
|
61
|
+
map.delete(obj); // true
|
|
62
|
+
map.get(obj); // undefined
|
|
63
|
+
map.has(obj); // false
|
|
64
|
+
map.set(obj, "bar"); // map
|
|
65
|
+
map.has(obj); // false
|
|
59
66
|
```
|
|
60
67
|
|
|
61
|
-
## Tests
|
|
68
|
+
## Tests
|
|
69
|
+
|
|
70
|
+
$ npm test
|
|
62
71
|
|
|
63
|
-
|
|
72
|
+
[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/es6-weak-map/branches/master/shields_badge.svg
|
|
73
|
+
[nix-build-url]: https://semaphoreci.com/medikoo-org/es6-weak-map
|
|
74
|
+
[win-build-image]: https://ci.appveyor.com/api/projects/status/1c73c57pg4s6lwmu?svg=true
|
|
75
|
+
[win-build-url]: https://ci.appveyor.com/project/medikoo/es6-weak-map
|
|
76
|
+
[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg
|
|
77
|
+
[npm-image]: https://img.shields.io/npm/v/es6-weak-map.svg
|
|
78
|
+
[npm-url]: https://www.npmjs.com/package/es6-weak-map
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
if (!require(
|
|
4
|
-
Object.defineProperty(require(
|
|
5
|
-
{
|
|
6
|
-
|
|
3
|
+
if (!require("./is-implemented")()) {
|
|
4
|
+
Object.defineProperty(require("es5-ext/global"), "WeakMap",
|
|
5
|
+
{
|
|
6
|
+
value: require("./polyfill"),
|
|
7
|
+
configurable: true,
|
|
8
|
+
enumerable: false,
|
|
9
|
+
writable: true
|
|
10
|
+
});
|
|
7
11
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
module.exports = require(
|
|
3
|
+
module.exports = require("./is-implemented")() ? WeakMap : require("./polyfill");
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = function () {
|
|
4
|
-
var weakMap,
|
|
5
|
-
|
|
4
|
+
var weakMap, obj;
|
|
5
|
+
|
|
6
|
+
if (typeof WeakMap !== "function") return false;
|
|
6
7
|
try {
|
|
7
8
|
// WebKit doesn't support arguments and crashes
|
|
8
|
-
weakMap = new WeakMap([[
|
|
9
|
+
weakMap = new WeakMap([[obj = {}, "one"], [{}, "two"], [{}, "three"]]);
|
|
9
10
|
} catch (e) {
|
|
10
11
|
return false;
|
|
11
12
|
}
|
|
12
|
-
if (String(weakMap) !==
|
|
13
|
-
if (typeof weakMap.set !==
|
|
13
|
+
if (String(weakMap) !== "[object WeakMap]") return false;
|
|
14
|
+
if (typeof weakMap.set !== "function") return false;
|
|
14
15
|
if (weakMap.set({}, 1) !== weakMap) return false;
|
|
15
|
-
if (typeof weakMap.delete !==
|
|
16
|
-
if (typeof weakMap.has !==
|
|
17
|
-
if (weakMap.get(
|
|
16
|
+
if (typeof weakMap.delete !== "function") return false;
|
|
17
|
+
if (typeof weakMap.has !== "function") return false;
|
|
18
|
+
if (weakMap.get(obj) !== "one") return false;
|
|
18
19
|
|
|
19
20
|
return true;
|
|
20
21
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Exports true if environment provides native `WeakMap` implementation, whatever that is.
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
"use strict";
|
|
4
4
|
|
|
5
5
|
module.exports = (function () {
|
|
6
|
-
if (typeof WeakMap !==
|
|
7
|
-
return
|
|
6
|
+
if (typeof WeakMap !== "function") return false;
|
|
7
|
+
return Object.prototype.toString.call(new WeakMap()) === "[object WeakMap]";
|
|
8
8
|
}());
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
var toStringTagSymbol = require(
|
|
3
|
+
var toStringTagSymbol = require("es6-symbol").toStringTag
|
|
4
4
|
|
|
5
|
-
,
|
|
6
|
-
, id =
|
|
7
|
-
, Global =
|
|
5
|
+
, objToString = Object.prototype.toString
|
|
6
|
+
, id = "[object WeakMap]"
|
|
7
|
+
, Global = typeof WeakMap === "undefined" ? null : WeakMap;
|
|
8
8
|
|
|
9
|
-
module.exports = function (
|
|
10
|
-
return (
|
|
11
|
-
(
|
|
9
|
+
module.exports = function (value) {
|
|
10
|
+
return (value && ((Global && (value instanceof Global)) ||
|
|
11
|
+
(objToString.call(value) === id) || (value[toStringTagSymbol] === "WeakMap"))) ||
|
|
12
12
|
false;
|
|
13
13
|
};
|
|
@@ -14,19 +14,20 @@
|
|
|
14
14
|
]
|
|
15
15
|
],
|
|
16
16
|
"_from": "es6-weak-map@>=2.0.1 <3.0.0",
|
|
17
|
-
"
|
|
17
|
+
"_hasShrinkwrap": false,
|
|
18
|
+
"_id": "es6-weak-map@2.0.3",
|
|
18
19
|
"_inCache": true,
|
|
19
20
|
"_location": "/es6-weak-map",
|
|
20
|
-
"_nodeVersion": "
|
|
21
|
+
"_nodeVersion": "12.3.1",
|
|
21
22
|
"_npmOperationalInternal": {
|
|
22
|
-
"host": "
|
|
23
|
-
"tmp": "tmp/es6-weak-
|
|
23
|
+
"host": "s3://npm-registry-packages",
|
|
24
|
+
"tmp": "tmp/es6-weak-map_2.0.3_1559919587997_0.6036277386033102"
|
|
24
25
|
},
|
|
25
26
|
"_npmUser": {
|
|
26
27
|
"name": "medikoo",
|
|
27
28
|
"email": "medikoo+npm@medikoo.com"
|
|
28
29
|
},
|
|
29
|
-
"_npmVersion": "
|
|
30
|
+
"_npmVersion": "6.9.0",
|
|
30
31
|
"_phantomChildren": {},
|
|
31
32
|
"_requested": {
|
|
32
33
|
"raw": "es6-weak-map@^2.0.1",
|
|
@@ -40,8 +41,8 @@
|
|
|
40
41
|
"_requiredBy": [
|
|
41
42
|
"/escope"
|
|
42
43
|
],
|
|
43
|
-
"_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.
|
|
44
|
-
"_shasum": "
|
|
44
|
+
"_resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
|
|
45
|
+
"_shasum": "b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53",
|
|
45
46
|
"_shrinkwrap": null,
|
|
46
47
|
"_spec": "es6-weak-map@^2.0.1",
|
|
47
48
|
"_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ/node_modules/escope",
|
|
@@ -55,22 +56,33 @@
|
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"d": "1",
|
|
58
|
-
"es5-ext": "^0.10.
|
|
59
|
-
"es6-iterator": "^2.0.
|
|
59
|
+
"es5-ext": "^0.10.46",
|
|
60
|
+
"es6-iterator": "^2.0.3",
|
|
60
61
|
"es6-symbol": "^3.1.1"
|
|
61
62
|
},
|
|
62
63
|
"description": "ECMAScript6 WeakMap polyfill",
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
65
|
+
"eslint": "^5.5",
|
|
66
|
+
"eslint-config-medikoo-es5": "^1.7",
|
|
67
|
+
"tad": "^0.2.8"
|
|
67
68
|
},
|
|
68
69
|
"directories": {},
|
|
69
70
|
"dist": {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
71
|
+
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
|
|
72
|
+
"shasum": "b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53",
|
|
73
|
+
"tarball": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
|
|
74
|
+
"fileCount": 20,
|
|
75
|
+
"unpackedSize": 12458,
|
|
76
|
+
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+nvkCRA9TVsSAnZWagAA1aMP/Ay2H01caRcZGHbsZVMH\nnn2X6YiZPYSgttvofDLI07ztoFeSxa5U7TVjzszuSWr7ODe+57zTBXKbc9Ci\npPP/Bk6ugyGf1uF2achgPXHgXtORbQkHWjCMx51DbUUr8RTSWoYVnR8UOPsy\nDxlOGcymbJdYQr3cEaKD1ZsHHG16x2qJ70fiVbcECG7CqGwidKhnTc6bPI2/\nOomgXXb/QzWMEyGigPnUIF1VdqkbYE5tbRpW4+XNRA7w1cEE0L6LE6RZ9+ka\n2HP8xS3zH78snSjk0PiuPrhoVW2WF6EANK32WmlIzKJ+WIFY8VSJkf5PhrjZ\nQVxlCeqjLj6jZiXWMvEkD8VRYJxXqVqR/HyOha2JVoNp3O8GE6KQrqnt3kjB\ntjplE+KveeipeVFdqzi1q+CbHMR69GYYDyxTcU5rEry4MsUhewJtvpJSii/O\n9Ujrmb9rrGJga4CbqL959PUl6SdKOyCj4Fl6TGQNQvtYfaXswfy5lJFbUbUT\nPThTYCFGttGHALXVxaVZFsRZ1X8vCOkhPPWkihoE5wdRGukORjkh/P8X1CE/\neD0K211B46sLV6D3h8GKJAnn8In2n5grUpH4JfaFAJJo1q4cEDH1B2F/f3CQ\nSDfBnLaKKINKY+TBjJNcx1WVxXtcA3QZa1pifFDOInxtJla5iC5g+Q9fPwGK\n1Fms\r\n=KQIl\r\n-----END PGP SIGNATURE-----\r\n"
|
|
72
77
|
},
|
|
73
|
-
"
|
|
78
|
+
"eslintConfig": {
|
|
79
|
+
"extends": "medikoo-es5",
|
|
80
|
+
"root": true,
|
|
81
|
+
"globals": {
|
|
82
|
+
"WeakMap": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"gitHead": "ac5868ab3b511552dca5fca178b1d118fed93653",
|
|
74
86
|
"homepage": "https://github.com/medikoo/es6-weak-map#readme",
|
|
75
87
|
"keywords": [
|
|
76
88
|
"map",
|
|
@@ -83,7 +95,7 @@
|
|
|
83
95
|
"gc",
|
|
84
96
|
"ponyfill"
|
|
85
97
|
],
|
|
86
|
-
"license": "
|
|
98
|
+
"license": "ISC",
|
|
87
99
|
"maintainers": [
|
|
88
100
|
{
|
|
89
101
|
"name": "medikoo",
|
|
@@ -98,9 +110,8 @@
|
|
|
98
110
|
"url": "git://github.com/medikoo/es6-weak-map.git"
|
|
99
111
|
},
|
|
100
112
|
"scripts": {
|
|
101
|
-
"lint": "
|
|
102
|
-
"lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
|
|
113
|
+
"lint": "eslint --ignore-path=.gitignore .",
|
|
103
114
|
"test": "node ./node_modules/tad/bin/tad"
|
|
104
115
|
},
|
|
105
|
-
"version": "2.0.
|
|
116
|
+
"version": "2.0.3"
|
|
106
117
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
,
|
|
5
|
-
,
|
|
6
|
-
,
|
|
7
|
-
,
|
|
8
|
-
,
|
|
9
|
-
,
|
|
10
|
-
,
|
|
11
|
-
,
|
|
3
|
+
var isValue = require("es5-ext/object/is-value")
|
|
4
|
+
, setPrototypeOf = require("es5-ext/object/set-prototype-of")
|
|
5
|
+
, object = require("es5-ext/object/valid-object")
|
|
6
|
+
, ensureValue = require("es5-ext/object/valid-value")
|
|
7
|
+
, randomUniq = require("es5-ext/string/random-uniq")
|
|
8
|
+
, d = require("d")
|
|
9
|
+
, getIterator = require("es6-iterator/get")
|
|
10
|
+
, forOf = require("es6-iterator/for-of")
|
|
11
|
+
, toStringTagSymbol = require("es6-symbol").toStringTag
|
|
12
|
+
, isNative = require("./is-native-implemented")
|
|
12
13
|
|
|
13
14
|
, isArray = Array.isArray, defineProperty = Object.defineProperty
|
|
14
|
-
,
|
|
15
|
+
, objHasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf
|
|
15
16
|
, WeakMapPoly;
|
|
16
17
|
|
|
17
|
-
module.exports = WeakMapPoly = function (/*
|
|
18
|
+
module.exports = WeakMapPoly = function (/* Iterable*/) {
|
|
18
19
|
var iterable = arguments[0], self;
|
|
19
|
-
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (iterable != null) {
|
|
20
|
+
|
|
21
|
+
if (!(this instanceof WeakMapPoly)) throw new TypeError("Constructor requires 'new'");
|
|
22
|
+
self = isNative && setPrototypeOf && (WeakMap !== WeakMapPoly)
|
|
23
|
+
? setPrototypeOf(new WeakMap(), getPrototypeOf(this)) : this;
|
|
24
|
+
|
|
25
|
+
if (isValue(iterable)) {
|
|
26
26
|
if (!isArray(iterable)) iterable = getIterator(iterable);
|
|
27
27
|
}
|
|
28
|
-
defineProperty(self,
|
|
28
|
+
defineProperty(self, "__weakMapData__", d("c", "$weakMap$" + randomUniq()));
|
|
29
29
|
if (!iterable) return self;
|
|
30
30
|
forOf(iterable, function (val) {
|
|
31
|
-
|
|
31
|
+
ensureValue(val);
|
|
32
32
|
self.set(val[0], val[1]);
|
|
33
33
|
});
|
|
34
34
|
return self;
|
|
@@ -36,31 +36,30 @@ module.exports = WeakMapPoly = function (/*iterable*/) {
|
|
|
36
36
|
|
|
37
37
|
if (isNative) {
|
|
38
38
|
if (setPrototypeOf) setPrototypeOf(WeakMapPoly, WeakMap);
|
|
39
|
-
WeakMapPoly.prototype = Object.create(WeakMap.prototype, {
|
|
40
|
-
constructor: d(WeakMapPoly)
|
|
41
|
-
});
|
|
39
|
+
WeakMapPoly.prototype = Object.create(WeakMap.prototype, { constructor: d(WeakMapPoly) });
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
Object.defineProperties(WeakMapPoly.prototype, {
|
|
45
43
|
delete: d(function (key) {
|
|
46
|
-
if (
|
|
44
|
+
if (objHasOwnProperty.call(object(key), this.__weakMapData__)) {
|
|
47
45
|
delete key[this.__weakMapData__];
|
|
48
46
|
return true;
|
|
49
47
|
}
|
|
50
48
|
return false;
|
|
51
49
|
}),
|
|
52
50
|
get: d(function (key) {
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
}
|
|
51
|
+
if (!objHasOwnProperty.call(object(key), this.__weakMapData__)) return undefined;
|
|
52
|
+
return key[this.__weakMapData__];
|
|
56
53
|
}),
|
|
57
54
|
has: d(function (key) {
|
|
58
|
-
return
|
|
55
|
+
return objHasOwnProperty.call(object(key), this.__weakMapData__);
|
|
59
56
|
}),
|
|
60
57
|
set: d(function (key, value) {
|
|
61
|
-
defineProperty(object(key), this.__weakMapData__, d(
|
|
58
|
+
defineProperty(object(key), this.__weakMapData__, d("c", value));
|
|
62
59
|
return this;
|
|
63
60
|
}),
|
|
64
|
-
toString: d(function () {
|
|
61
|
+
toString: d(function () {
|
|
62
|
+
return "[object WeakMap]";
|
|
63
|
+
})
|
|
65
64
|
});
|
|
66
|
-
defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d(
|
|
65
|
+
defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d("c", "WeakMap"));
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
, polyfill
|
|
3
|
+
var globalObj = require("es5-ext/global")
|
|
4
|
+
, polyfill = require("../polyfill");
|
|
5
5
|
|
|
6
6
|
module.exports = function (t, a) {
|
|
7
7
|
var cache;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
|
|
9
|
+
a(typeof t(), "boolean");
|
|
10
|
+
cache = globalObj.WeakMap;
|
|
11
|
+
globalObj.WeakMap = polyfill;
|
|
11
12
|
a(t(), true);
|
|
12
|
-
if (cache === undefined) delete
|
|
13
|
-
else
|
|
13
|
+
if (cache === undefined) delete globalObj.WeakMap;
|
|
14
|
+
else globalObj.WeakMap = cache;
|
|
14
15
|
};
|