Sha256: dbf49ae6b1bfbd200a3e2db9dd6ab694db147f0c1e25000ca615c467a4f38207

Contents?: true

Size: 1.16 KB

Versions: 26

Compression:

Stored size: 1.16 KB

Contents

'use strict';

var RequireObjectCoercible = require('es-abstract/2023/RequireObjectCoercible');
var ToString = require('es-abstract/2023/ToString');
var callBound = require('call-bind/callBound');
var $replace = callBound('String.prototype.replace');

var mvsIsWS = (/^\s$/).test('\u180E');
/* eslint-disable no-control-regex */
var leftWhitespace = mvsIsWS
	? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/
	: /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/;
var rightWhitespace = mvsIsWS
	? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/
	: /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;
/* eslint-enable no-control-regex */

module.exports = function trim() {
	var S = ToString(RequireObjectCoercible(this));
	return $replace($replace(S, leftWhitespace, ''), rightWhitespace, '');
};

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.32 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.31 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.30 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.29 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.28 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.27 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.26 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.25 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.24 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.23 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.22 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.21 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.20 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.19 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.18 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.17 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.16 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.14 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.13 node_modules/string.prototype.trim/implementation.js
immosquare-cleaner-0.1.12 node_modules/string.prototype.trim/implementation.js