Socket
Socket
Sign inDemoInstall

es-set-tostringtag

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-set-tostringtag - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

index.d.ts

9

CHANGELOG.md

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

## [v2.0.3](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.2...v2.0.3) - 2024-02-20
### Commits
- add types [`d538513`](https://github.com/es-shims/es-set-tostringtag/commit/d5385133592a32a0a416cb535327918af7fbc4ad)
- [Deps] update `get-intrinsic`, `has-tostringtag`, `hasown` [`d129b29`](https://github.com/es-shims/es-set-tostringtag/commit/d129b29536bccc8a9d03a47887ca4d1f7ad0c5b9)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`132ed23`](https://github.com/es-shims/es-set-tostringtag/commit/132ed23c964a41ed55e4ab4a5a2c3fe185e821c1)
- [Tests] fix hasOwn require [`f89c831`](https://github.com/es-shims/es-set-tostringtag/commit/f89c831fe5f3edf1f979c597b56fee1be6111f56)
## [v2.0.2](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.1...v2.0.2) - 2023-10-20

@@ -10,0 +19,0 @@

1

index.js

@@ -12,2 +12,3 @@ 'use strict';

/** @type {import('.')} */
module.exports = function setToStringTag(object, value) {

@@ -14,0 +15,0 @@ var overrideIfSet = arguments.length > 2 && arguments[2] && arguments[2].force;

19

package.json
{
"name": "es-set-tostringtag",
"version": "2.0.2",
"version": "2.0.3",
"description": "A helper to optimistically set Symbol.toStringTag, when possible.",

@@ -17,2 +17,3 @@ "main": "index.js",

"lint": "eslint --ext=js,mjs .",
"postlint": "tsc -p .",
"pretest": "npm run lint",

@@ -37,3 +38,6 @@ "tests-only": "tape 'test/**/*.js'",

"@ljharb/eslint-config": "^21.1.0",
"aud": "^2.0.3",
"@types/get-intrinsic": "^1.2.2",
"@types/has-symbols": "^1.0.2",
"@types/tape": "^5.6.4",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",

@@ -43,10 +47,11 @@ "eslint": "=8.8.0",

"in-publish": "^2.0.1",
"npmignore": "^0.3.0",
"npmignore": "^0.3.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.2"
"tape": "^5.7.5",
"typescript": "^5.4.0-dev.20240220"
},
"dependencies": {
"get-intrinsic": "^1.2.2",
"has-tostringtag": "^1.0.0",
"hasown": "^2.0.0"
"get-intrinsic": "^1.2.4",
"has-tostringtag": "^1.0.2",
"hasown": "^2.0.1"
},

@@ -53,0 +58,0 @@ "engines": {

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

var hasToStringTag = require('has-tostringtag/shams')();
var has = require('has');
var hasOwn = require('hasown');

@@ -13,2 +13,3 @@ var setToStringTag = require('../');

/** @type {{ [Symbol.toStringTag]?: typeof sentinel }} */
var obj = {};

@@ -20,3 +21,3 @@ var sentinel = {};

t.test('has Symbol.toStringTag', { skip: !hasToStringTag }, function (st) {
st.ok(has(obj, Symbol.toStringTag), 'has toStringTag property');
st.ok(hasOwn(obj, Symbol.toStringTag), 'has toStringTag property');

@@ -27,2 +28,3 @@ st.equal(obj[Symbol.toStringTag], sentinel, 'toStringTag property is as expected');

/** @type {{ [Symbol.toStringTag]?: string }} */
var tagged = {};

@@ -44,3 +46,3 @@ tagged[Symbol.toStringTag] = 'already tagged';

for (var key in obj) { // eslint-disable-line no-restricted-syntax
if (has(obj, key)) {
if (hasOwn(obj, key)) {
st.fail('object has own key ' + key);

@@ -47,0 +49,0 @@ passed = false;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc