Sha256: eebc2dd839270a93a8fd8cb8e606340b834a35bdd039c4e78e408fc5aa438270

Contents?: true

Size: 458 Bytes

Versions: 50

Compression:

Stored size: 458 Bytes

Contents

'use strict';

var implementation = require('./implementation');

module.exports = function getPolyfill() {
	if (!String.prototype.trimEnd && !String.prototype.trimRight) {
		return implementation;
	}
	var zeroWidthSpace = '\u200b';
	var trimmed = zeroWidthSpace.trimEnd ? zeroWidthSpace.trimEnd() : zeroWidthSpace.trimRight();
	if (trimmed !== zeroWidthSpace) {
		return implementation;
	}
	return String.prototype.trimEnd || String.prototype.trimRight;
};

Version data entries

50 entries across 49 versions & 6 rubygems

Version Path
immosquare-cleaner-0.1.6 node_modules/string.prototype.trimend/polyfill.js
decidim-0.26.8 packages/eslint-config/node_modules/string.prototype.trimend/polyfill.js
tang-0.2.1 spec/tang_app/node_modules/string.prototype.trimend/polyfill.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/string.prototype.trimend/polyfill.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/string.prototype.trimend/polyfill.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/string.prototype.trimend/polyfill.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/string.prototype.trimend/polyfill.js
tang-0.2.0 spec/tang_app/node_modules/string.prototype.trimend/polyfill.js
tang-0.1.0 spec/tang_app/node_modules/string.prototype.trimend/polyfill.js
tang-0.0.9 spec/tang_app/node_modules/string.prototype.trimend/polyfill.js