🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more →
Sign In

string.prototype.trim

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string.prototype.trim - npm Package Compare versions

Comparing version
1.2.9
to
1.2.10
+13
-0
CHANGELOG.md

@@ -8,2 +8,15 @@ # Changelog

## [v1.2.10](https://github.com/es-shims/String.prototype.trim/compare/v1.2.9...v1.2.10) - 2024-12-11
### Commits
- [actions] split out node 10-20, and 20+ [`335d99a`](https://github.com/es-shims/String.prototype.trim/commit/335d99a408ee623eb60ca53af13da1813d3ee1b8)
- [Refactor] use `define-data-property` and `has-property-descriptors` directly [`2e0c2e9`](https://github.com/es-shims/String.prototype.trim/commit/2e0c2e9979c9368b13a90a31ae79ca8b1f2fa01a)
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `auto-changelog`, `tape` [`138d3db`](https://github.com/es-shims/String.prototype.trim/commit/138d3db824e6fed5a0f9c81ae06534ef4e20b969)
- [Deps] update `call-bind`, `es-abstract` [`3a06731`](https://github.com/es-shims/String.prototype.trim/commit/3a0673152cc347f42feed04a6936d824ffb2bb57)
- [Refactor] use `call-bound` directly [`9499206`](https://github.com/es-shims/String.prototype.trim/commit/9499206837e054fac9b48db0f63c09dd1e955e11)
- [Tests] replace `aud` with `npm audit` [`c88a935`](https://github.com/es-shims/String.prototype.trim/commit/c88a935c098d8a9809812af68c1fc51ab65854cb)
- [Dev Deps] add missing dev dep [`9667c7d`](https://github.com/es-shims/String.prototype.trim/commit/9667c7d04de2dff034cde13f41aca9e203947d43)
- [Dev Deps] add missing peer dep [`6417c72`](https://github.com/es-shims/String.prototype.trim/commit/6417c727c94acb568ad4f5b4674996401f5ee531)
## [v1.2.9](https://github.com/es-shims/String.prototype.trim/compare/v1.2.8...v1.2.9) - 2024-03-16

@@ -10,0 +23,0 @@

+1
-1

@@ -5,3 +5,3 @@ 'use strict';

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

@@ -8,0 +8,0 @@

{
"name": "string.prototype.trim",
"version": "1.2.9",
"version": "1.2.10",
"author": {

@@ -28,3 +28,3 @@ "name": "Jordan Harband",

"test": "npm run tests-only",
"posttest": "aud --production",
"posttest": "npx npm@'>= 10.2' audit --production",
"tests-only": "nyc tape 'test/**/*.js'",

@@ -50,13 +50,17 @@ "lint": "eslint --ext=js,mjs .",

"dependencies": {
"call-bind": "^1.0.7",
"call-bind": "^1.0.8",
"call-bound": "^1.0.2",
"define-data-property": "^1.1.4",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.0",
"es-object-atoms": "^1.0.0"
"es-abstract": "^1.23.5",
"es-object-atoms": "^1.0.0",
"has-property-descriptors": "^1.0.2"
},
"devDependencies": {
"@es-shims/api": "^2.4.2",
"@ljharb/eslint-config": "^21.1.0",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"@es-shims/api": "^2.5.1",
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"functions-have-names": "^1.2.3",

@@ -68,3 +72,3 @@ "has-strict-mode": "^1.0.1",

"safe-publish-latest": "^2.0.0",
"tape": "^5.7.5"
"tape": "^5.9.0"
},

@@ -71,0 +75,0 @@ "testling": {

+11
-5
'use strict';
var define = require('define-properties');
var supportsDescriptors = require('has-property-descriptors')();
var defineDataProperty = require('define-data-property');
var getPolyfill = require('./polyfill');

@@ -8,8 +10,12 @@

var polyfill = getPolyfill();
define(String.prototype, { trim: polyfill }, {
trim: function testTrim() {
return String.prototype.trim !== polyfill;
if (String.prototype.trim !== polyfill) {
if (supportsDescriptors) {
defineDataProperty(String.prototype, 'trim', polyfill, true);
} else {
defineDataProperty(String.prototype, 'trim', polyfill);
}
});
}
return polyfill;
};