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.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +46 -23
  3. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +8 -2
  4. data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +101 -21
  5. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +9 -2
  6. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +4 -6
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +36 -5
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +14 -14
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +23 -23
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +8 -8
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +2 -2
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +8 -8
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +10 -10
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +11 -14
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +14 -14
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +8 -8
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +7 -7
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +20 -16
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +4 -4
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +5 -5
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss +5 -5
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +8 -8
  24. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +1 -1
  25. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +33 -25
  26. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +4 -2
  27. data/app/views/govuk_publishing_components/components/_notice.html.erb +4 -1
  28. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -0
  29. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +6 -0
  30. data/app/views/govuk_publishing_components/components/docs/notice.yml +6 -0
  31. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  32. data/lib/govuk_publishing_components/presenters/cookie_banner_helper.rb +0 -4
  33. data/lib/govuk_publishing_components/version.rb +1 -1
  34. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +1 -1
  35. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -1
  36. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +1 -1
  37. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -1
  38. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +1 -1
  39. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -1
  40. data/node_modules/accessible-autocomplete/package.json +3 -3
  41. data/node_modules/accessible-autocomplete/src/autocomplete.js +4 -2
  42. data/node_modules/accessible-autocomplete/src/wrapper.js +5 -1
  43. data/node_modules/d/CHANGELOG.md +9 -0
  44. data/node_modules/d/CHANGES +4 -0
  45. data/node_modules/d/LICENSE +12 -16
  46. data/node_modules/d/README.md +49 -19
  47. data/node_modules/d/auto-bind.js +11 -10
  48. data/node_modules/d/index.js +23 -24
  49. data/node_modules/d/lazy.js +21 -23
  50. data/node_modules/d/package.json +63 -16
  51. data/node_modules/d/test/auto-bind.js +6 -7
  52. data/node_modules/d/test/index.js +78 -51
  53. data/node_modules/d/test/lazy.js +65 -50
  54. data/node_modules/es6-weak-map/CHANGELOG.md +5 -0
  55. data/node_modules/es6-weak-map/LICENSE +12 -16
  56. data/node_modules/es6-weak-map/README.md +34 -19
  57. data/node_modules/es6-weak-map/implement.js +9 -5
  58. data/node_modules/es6-weak-map/index.js +2 -2
  59. data/node_modules/es6-weak-map/is-implemented.js +10 -9
  60. data/node_modules/es6-weak-map/is-native-implemented.js +3 -3
  61. data/node_modules/es6-weak-map/is-weak-map.js +8 -8
  62. data/node_modules/es6-weak-map/package.json +30 -19
  63. data/node_modules/es6-weak-map/polyfill.js +31 -32
  64. data/node_modules/es6-weak-map/test/implement.js +4 -2
  65. data/node_modules/es6-weak-map/test/index.js +4 -3
  66. data/node_modules/es6-weak-map/test/is-implemented.js +9 -8
  67. data/node_modules/es6-weak-map/test/is-native-implemented.js +4 -2
  68. data/node_modules/es6-weak-map/test/is-weak-map.js +4 -4
  69. data/node_modules/es6-weak-map/test/polyfill.js +13 -13
  70. data/node_modules/es6-weak-map/test/valid-weak-map.js +22 -9
  71. data/node_modules/es6-weak-map/valid-weak-map.js +5 -5
  72. data/node_modules/resolve/lib/async.js +1 -1
  73. data/node_modules/resolve/lib/node-modules-paths.js +1 -1
  74. data/node_modules/resolve/lib/sync.js +0 -2
  75. data/node_modules/resolve/package.json +13 -13
  76. data/node_modules/resolve/test/node-modules-paths.js +0 -22
  77. data/node_modules/resolve/test/resolver.js +11 -0
  78. data/node_modules/resolve/test/resolver_sync.js +11 -0
  79. data/node_modules/standard/node_modules/ms/index.js +2 -2
  80. data/node_modules/standard/node_modules/ms/package.json +205 -16
  81. data/node_modules/standard/node_modules/ms/readme.md +1 -1
  82. data/node_modules/type/CHANGELOG.md +62 -0
  83. data/node_modules/type/README.md +743 -0
  84. data/node_modules/type/array-length/coerce.js +10 -0
  85. data/node_modules/type/array-length/ensure.js +10 -0
  86. data/node_modules/type/array-like/ensure.js +9 -0
  87. data/node_modules/type/array-like/is.js +21 -0
  88. data/node_modules/type/array/ensure.js +9 -0
  89. data/node_modules/type/array/is.js +27 -0
  90. data/node_modules/type/date/ensure.js +9 -0
  91. data/node_modules/type/date/is.js +26 -0
  92. data/node_modules/type/error/ensure.js +9 -0
  93. data/node_modules/type/error/is.js +24 -0
  94. data/node_modules/type/finite/coerce.js +8 -0
  95. data/node_modules/type/finite/ensure.js +10 -0
  96. data/node_modules/type/function/ensure.js +9 -0
  97. data/node_modules/type/function/is.js +19 -0
  98. data/node_modules/type/integer/coerce.js +11 -0
  99. data/node_modules/type/integer/ensure.js +10 -0
  100. data/node_modules/type/iterable/ensure.js +9 -0
  101. data/node_modules/type/iterable/is.js +20 -0
  102. data/node_modules/type/lib/is-to-string-tag-supported.js +3 -0
  103. data/node_modules/type/lib/resolve-exception.js +21 -0
  104. data/node_modules/type/lib/safe-to-string.js +10 -0
  105. data/node_modules/type/lib/to-short-string.js +29 -0
  106. data/node_modules/type/natural-number/coerce.js +10 -0
  107. data/node_modules/type/natural-number/ensure.js +10 -0
  108. data/node_modules/type/number/coerce.js +14 -0
  109. data/node_modules/type/number/ensure.js +10 -0
  110. data/node_modules/type/object/ensure.js +9 -0
  111. data/node_modules/type/object/is.js +11 -0
  112. data/node_modules/type/package.json +159 -0
  113. data/node_modules/type/plain-function/ensure.js +9 -0
  114. data/node_modules/type/plain-function/is.js +11 -0
  115. data/node_modules/type/plain-object/ensure.js +9 -0
  116. data/node_modules/type/plain-object/is.js +28 -0
  117. data/node_modules/type/promise/ensure.js +9 -0
  118. data/node_modules/type/promise/is.js +27 -0
  119. data/node_modules/type/prototype/is.js +13 -0
  120. data/node_modules/type/reg-exp/ensure.js +9 -0
  121. data/node_modules/type/reg-exp/is.js +37 -0
  122. data/node_modules/type/safe-integer/coerce.js +13 -0
  123. data/node_modules/type/safe-integer/ensure.js +10 -0
  124. data/node_modules/type/string/coerce.js +23 -0
  125. data/node_modules/type/string/ensure.js +10 -0
  126. data/node_modules/type/test/_lib/arrow-function-if-supported.js +4 -0
  127. data/node_modules/type/test/_lib/class-if-supported.js +4 -0
  128. data/node_modules/type/test/array-length/coerce.js +47 -0
  129. data/node_modules/type/test/array-length/ensure.js +19 -0
  130. data/node_modules/type/test/array-like/ensure.js +24 -0
  131. data/node_modules/type/test/array-like/is.js +47 -0
  132. data/node_modules/type/test/array/ensure.js +20 -0
  133. data/node_modules/type/test/array/is.js +41 -0
  134. data/node_modules/type/test/date/ensure.js +20 -0
  135. data/node_modules/type/test/date/is.js +46 -0
  136. data/node_modules/type/test/error/ensure.js +20 -0
  137. data/node_modules/type/test/error/is.js +42 -0
  138. data/node_modules/type/test/finite/coerce.js +40 -0
  139. data/node_modules/type/test/finite/ensure.js +17 -0
  140. data/node_modules/type/test/function/ensure.js +20 -0
  141. data/node_modules/type/test/function/is.js +46 -0
  142. data/node_modules/type/test/integer/coerce.js +49 -0
  143. data/node_modules/type/test/integer/ensure.js +17 -0
  144. data/node_modules/type/test/iterable/ensure.js +24 -0
  145. data/node_modules/type/test/iterable/is.js +50 -0
  146. data/node_modules/type/test/lib/is-to-string-tag-supported.js +10 -0
  147. data/node_modules/type/test/lib/resolve-exception.js +39 -0
  148. data/node_modules/type/test/lib/safe-to-string.js +32 -0
  149. data/node_modules/type/test/lib/to-short-string.js +41 -0
  150. data/node_modules/type/test/natural-number/coerce.js +47 -0
  151. data/node_modules/type/test/natural-number/ensure.js +19 -0
  152. data/node_modules/type/test/number/coerce.js +40 -0
  153. data/node_modules/type/test/number/ensure.js +17 -0
  154. data/node_modules/type/test/object/ensure.js +20 -0
  155. data/node_modules/type/test/object/is.js +30 -0
  156. data/node_modules/type/test/plain-function/ensure.js +20 -0
  157. data/node_modules/type/test/plain-function/is.js +56 -0
  158. data/node_modules/type/test/plain-object/ensure.js +20 -0
  159. data/node_modules/type/test/plain-object/is.js +47 -0
  160. data/node_modules/type/test/promise/ensure.js +20 -0
  161. data/node_modules/type/test/promise/is.js +39 -0
  162. data/node_modules/type/test/prototype/is.js +39 -0
  163. data/node_modules/type/test/reg-exp/ensure.js +20 -0
  164. data/node_modules/type/test/reg-exp/is.js +47 -0
  165. data/node_modules/type/test/safe-integer/coerce.js +49 -0
  166. data/node_modules/type/test/safe-integer/ensure.js +19 -0
  167. data/node_modules/type/test/string/coerce.js +36 -0
  168. data/node_modules/type/test/string/ensure.js +17 -0
  169. data/node_modules/type/test/thenable/ensure.js +20 -0
  170. data/node_modules/type/test/thenable/is.js +44 -0
  171. data/node_modules/type/test/time-value/coerce.js +47 -0
  172. data/node_modules/type/test/time-value/ensure.js +17 -0
  173. data/node_modules/type/test/value/ensure.js +20 -0
  174. data/node_modules/type/test/value/is.js +29 -0
  175. data/node_modules/type/thenable/ensure.js +9 -0
  176. data/node_modules/type/thenable/is.js +9 -0
  177. data/node_modules/type/time-value/coerce.js +12 -0
  178. data/node_modules/type/time-value/ensure.js +10 -0
  179. data/node_modules/type/value/ensure.js +9 -0
  180. data/node_modules/type/value/is.js +6 -0
  181. metadata +118 -21
  182. data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-navigation.scss +0 -94
  183. data/node_modules/resolve/reaf +0 -0
  184. data/node_modules/resolve/test/shadowed_core.js +0 -38
  185. 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
- Copyright (C) 2013 Mariusz Nowak (www.medikoo.com)
1
+ ISC License
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
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
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
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", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
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
- - Assumes compliant ES5 environment (no weird ES3 workarounds or hacks)
8
- - Well modularized CJS style
9
- - Based on one solution.
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
- - Will fail on non extensible objects provided as keys
20
+ - Will fail on non extensible objects provided as keys
14
21
 
15
22
  ### Installation
16
23
 
17
- $ npm install es6-weak-map
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('es6-weak-map/implement');
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('es6-weak-map');
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('es6-weak-map/polyfill');
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('es6-weak-map');
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, 'foo'); // map
52
- map.get(obj); // 'foo'
53
- map.has(obj); // true
54
- map.delete(obj); // true
55
- map.get(obj); // undefined
56
- map.has(obj); // false
57
- map.set(obj, 'bar'); // map
58
- map.has(obj); // false
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 [![Build Status](https://travis-ci.org/medikoo/es6-weak-map.svg)](https://travis-ci.org/medikoo/es6-weak-map)
68
+ ## Tests
69
+
70
+ $ npm test
62
71
 
63
- $ npm test
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
- 'use strict';
1
+ "use strict";
2
2
 
3
- if (!require('./is-implemented')()) {
4
- Object.defineProperty(require('es5-ext/global'), 'WeakMap',
5
- { value: require('./polyfill'), configurable: true, enumerable: false,
6
- writable: true });
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
- 'use strict';
1
+ "use strict";
2
2
 
3
- module.exports = require('./is-implemented')() ? WeakMap : require('./polyfill');
3
+ module.exports = require("./is-implemented")() ? WeakMap : require("./polyfill");
@@ -1,20 +1,21 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = function () {
4
- var weakMap, x;
5
- if (typeof WeakMap !== 'function') return false;
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([[x = {}, 'one'], [{}, 'two'], [{}, 'three']]);
9
+ weakMap = new WeakMap([[obj = {}, "one"], [{}, "two"], [{}, "three"]]);
9
10
  } catch (e) {
10
11
  return false;
11
12
  }
12
- if (String(weakMap) !== '[object WeakMap]') return false;
13
- if (typeof weakMap.set !== 'function') return false;
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 !== 'function') return false;
16
- if (typeof weakMap.has !== 'function') return false;
17
- if (weakMap.get(x) !== 'one') return false;
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
- 'use strict';
3
+ "use strict";
4
4
 
5
5
  module.exports = (function () {
6
- if (typeof WeakMap !== 'function') return false;
7
- return (Object.prototype.toString.call(new WeakMap()) === '[object WeakMap]');
6
+ if (typeof WeakMap !== "function") return false;
7
+ return Object.prototype.toString.call(new WeakMap()) === "[object WeakMap]";
8
8
  }());
@@ -1,13 +1,13 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var toStringTagSymbol = require('es6-symbol').toStringTag
3
+ var toStringTagSymbol = require("es6-symbol").toStringTag
4
4
 
5
- , toString = Object.prototype.toString
6
- , id = '[object WeakMap]'
7
- , Global = (typeof WeakMap === 'undefined') ? null : WeakMap;
5
+ , objToString = Object.prototype.toString
6
+ , id = "[object WeakMap]"
7
+ , Global = typeof WeakMap === "undefined" ? null : WeakMap;
8
8
 
9
- module.exports = function (x) {
10
- return (x && ((Global && (x instanceof Global)) ||
11
- (toString.call(x) === id) || (x[toStringTagSymbol] === 'WeakMap'))) ||
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
- "_id": "es6-weak-map@2.0.2",
17
+ "_hasShrinkwrap": false,
18
+ "_id": "es6-weak-map@2.0.3",
18
19
  "_inCache": true,
19
20
  "_location": "/es6-weak-map",
20
- "_nodeVersion": "7.7.3",
21
+ "_nodeVersion": "12.3.1",
21
22
  "_npmOperationalInternal": {
22
- "host": "packages-12-west.internal.npmjs.com",
23
- "tmp": "tmp/es6-weak-map-2.0.2.tgz_1489593299009_0.35603313939645886"
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": "4.1.2",
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.2.tgz",
44
- "_shasum": "5e3ab32251ffd1538a1f8e5ffa1357772f92d96f",
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.14",
59
- "es6-iterator": "^2.0.1",
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
- "tad": "^0.2.7",
65
- "xlint": "^0.2.2",
66
- "xlint-jslint-medikoo": "^0.1.4"
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
- "shasum": "5e3ab32251ffd1538a1f8e5ffa1357772f92d96f",
71
- "tarball": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz"
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
- "gitHead": "14c8b5703569d9c4f8788812abfea2ecab8433a6",
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": "MIT",
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": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
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.2"
116
+ "version": "2.0.3"
106
117
  }
@@ -1,34 +1,34 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var setPrototypeOf = require('es5-ext/object/set-prototype-of')
4
- , object = require('es5-ext/object/valid-object')
5
- , value = require('es5-ext/object/valid-value')
6
- , randomUniq = require('es5-ext/string/random-uniq')
7
- , d = require('d')
8
- , getIterator = require('es6-iterator/get')
9
- , forOf = require('es6-iterator/for-of')
10
- , toStringTagSymbol = require('es6-symbol').toStringTag
11
- , isNative = require('./is-native-implemented')
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
- , hasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf
15
+ , objHasOwnProperty = Object.prototype.hasOwnProperty, getPrototypeOf = Object.getPrototypeOf
15
16
  , WeakMapPoly;
16
17
 
17
- module.exports = WeakMapPoly = function (/*iterable*/) {
18
+ module.exports = WeakMapPoly = function (/* Iterable*/) {
18
19
  var iterable = arguments[0], self;
19
- if (!(this instanceof WeakMapPoly)) throw new TypeError('Constructor requires \'new\'');
20
- if (isNative && setPrototypeOf && (WeakMap !== WeakMapPoly)) {
21
- self = setPrototypeOf(new WeakMap(), getPrototypeOf(this));
22
- } else {
23
- self = this;
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, '__weakMapData__', d('c', '$weakMap$' + randomUniq()));
28
+ defineProperty(self, "__weakMapData__", d("c", "$weakMap$" + randomUniq()));
29
29
  if (!iterable) return self;
30
30
  forOf(iterable, function (val) {
31
- value(val);
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 (hasOwnProperty.call(object(key), this.__weakMapData__)) {
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 (hasOwnProperty.call(object(key), this.__weakMapData__)) {
54
- return key[this.__weakMapData__];
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 hasOwnProperty.call(object(key), this.__weakMapData__);
55
+ return objHasOwnProperty.call(object(key), this.__weakMapData__);
59
56
  }),
60
57
  set: d(function (key, value) {
61
- defineProperty(object(key), this.__weakMapData__, d('c', value));
58
+ defineProperty(object(key), this.__weakMapData__, d("c", value));
62
59
  return this;
63
60
  }),
64
- toString: d(function () { return '[object WeakMap]'; })
61
+ toString: d(function () {
62
+ return "[object WeakMap]";
63
+ })
65
64
  });
66
- defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d('c', 'WeakMap'));
65
+ defineProperty(WeakMapPoly.prototype, toStringTagSymbol, d("c", "WeakMap"));
@@ -1,3 +1,5 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- module.exports = function (t, a) { a(typeof WeakMap, 'function'); };
3
+ module.exports = function (t, a) {
4
+ a(typeof WeakMap, "function");
5
+ };
@@ -1,6 +1,7 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = function (T, a) {
4
- var x = {};
5
- a((new T([[x, 'foo']])).get(x), 'foo');
4
+ var obj = {};
5
+
6
+ a((new T([[obj, "foo"]])).get(obj), "foo");
6
7
  };
@@ -1,14 +1,15 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var global = require('es5-ext/global')
4
- , polyfill = require('../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
- a(typeof t(), 'boolean');
9
- cache = global.WeakMap;
10
- global.WeakMap = polyfill;
8
+
9
+ a(typeof t(), "boolean");
10
+ cache = globalObj.WeakMap;
11
+ globalObj.WeakMap = polyfill;
11
12
  a(t(), true);
12
- if (cache === undefined) delete global.WeakMap;
13
- else global.WeakMap = cache;
13
+ if (cache === undefined) delete globalObj.WeakMap;
14
+ else globalObj.WeakMap = cache;
14
15
  };