Sha256: 501ae831cd2dbb2030743149e19865efb726188af2850d818768396e1186a887

Contents?: true

Size: 614 Bytes

Versions: 23

Compression:

Stored size: 614 Bytes

Contents

'use strict';

module.exports = function () {
	var weakMap, x;
	if (typeof WeakMap !== 'function') return false;
	try {
		// WebKit doesn't support arguments and crashes
		weakMap = new WeakMap([[x = {}, 'one'], [{}, 'two'], [{}, 'three']]);
	} catch (e) {
		return false;
	}
	if (String(weakMap) !== '[object WeakMap]') return false;
	if (typeof weakMap.set !== 'function') return false;
	if (weakMap.set({}, 1) !== weakMap) return false;
	if (typeof weakMap.delete !== 'function') return false;
	if (typeof weakMap.has !== 'function') return false;
	if (weakMap.get(x) !== 'one') return false;

	return true;
};

Version data entries

23 entries across 23 versions & 6 rubygems

Version Path
govuk_publishing_components-16.29.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.28.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.27.1 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.27.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.26.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.25.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.24.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.23.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.22.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.21.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.20.1 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.20.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.19.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.18.0 node_modules/es6-weak-map/is-implemented.js
govuk_publishing_components-16.17.0 node_modules/es6-weak-map/is-implemented.js
optimacms-0.4.3 spec/dummy/node_modules/es6-weak-map/is-implemented.js
optimacms-0.4.2 spec/dummy/node_modules/es6-weak-map/is-implemented.js
cortex-0.1.3 spec/dummy/node_modules/es6-weak-map/is-implemented.js
guard-sass-lint-0.1.2 node_modules/es6-weak-map/is-implemented.js
guard-sass-lint-0.1.1 node_modules/es6-weak-map/is-implemented.js