Socket
Socket
Sign inDemoInstall

unbox-primitive

Package Overview
Dependencies
20
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

13

CHANGELOG.md

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

## [v1.0.2](https://github.com/ljharb/unbox-primitive/compare/v1.0.1...v1.0.2) - 2022-04-24
### Commits
- [actions] reuse common workflows [`e6420b9`](https://github.com/ljharb/unbox-primitive/commit/e6420b94eed3558ef3ecddbd3d85fe2f400d1db1)
- [actions] update codecov uploader [`b90aff2`](https://github.com/ljharb/unbox-primitive/commit/b90aff2b17b70c1a7200eb5faa3f9e64ebf055f9)
- [readme] add github actions/codecov badges; update URLs [`bcc39b9`](https://github.com/ljharb/unbox-primitive/commit/bcc39b9d6d101bad199c95604f94999f80d6da97)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`a704a32`](https://github.com/ljharb/unbox-primitive/commit/a704a32ec4af43cd0631317ae3a537012adc1610)
- [Refactor] use `call-bind` instead of `function-bind` [`0a609f1`](https://github.com/ljharb/unbox-primitive/commit/0a609f1be6269cbf501482aacd9a0a1bd8596108)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`6a45317`](https://github.com/ljharb/unbox-primitive/commit/6a4531757d74af97c9d0770b102f81ce6ff0a8dc)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`795c76f`](https://github.com/ljharb/unbox-primitive/commit/795c76f14c4df3c7ae934f7b14a98c07951ea9c7)
- [Deps] update `has-bigints`, `has-symbols` [`257a065`](https://github.com/ljharb/unbox-primitive/commit/257a065496b4190c296d674bff342ea40cf8e176)
## [v1.0.1](https://github.com/ljharb/unbox-primitive/compare/v1.0.0...v1.0.1) - 2021-03-25

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

12

index.js
'use strict';
var whichBoxedPrimitive = require('which-boxed-primitive');
var bind = require('function-bind');
var callBound = require('call-bind/callBound');
var hasSymbols = require('has-symbols')();
var hasBigInts = require('has-bigints')();
var stringToString = bind.call(Function.call, String.prototype.toString);
var numberValueOf = bind.call(Function.call, Number.prototype.valueOf);
var booleanValueOf = bind.call(Function.call, Boolean.prototype.valueOf);
var symbolValueOf = hasSymbols && bind.call(Function.call, Symbol.prototype.valueOf);
var bigIntValueOf = hasBigInts && bind.call(Function.call, BigInt.prototype.valueOf);
var stringToString = callBound('String.prototype.toString');
var numberValueOf = callBound('Number.prototype.valueOf');
var booleanValueOf = callBound('Boolean.prototype.valueOf');
var symbolValueOf = hasSymbols && callBound('Symbol.prototype.valueOf');
var bigIntValueOf = hasBigInts && callBound('BigInt.prototype.valueOf');

@@ -14,0 +14,0 @@ module.exports = function unboxPrimitive(value) {

{
"name": "unbox-primitive",
"version": "1.0.1",
"version": "1.0.2",
"description": "Unbox a boxed JS primitive value.",
"main": "index.js",
"scripts": {
"prepublish": "not-in-publish || safe-publish-latest",
"lint": "eslint .",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"lint": "eslint --ext=js,mjs .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx aud --production",
"posttest": "aud --production",
"version": "auto-changelog && git add CHANGELOG.md",

@@ -38,18 +39,18 @@ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""

"devDependencies": {
"@ljharb/eslint-config": "^17.5.1",
"aud": "^1.1.4",
"auto-changelog": "^2.2.1",
"eslint": "^7.22.0",
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.0",
"auto-changelog": "^2.4.0",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"nyc": "^10.3.2",
"object-inspect": "^1.9.0",
"object-inspect": "^1.12.0",
"object-is": "^1.1.5",
"safe-publish-latest": "^1.1.4",
"tape": "^5.2.2"
"safe-publish-latest": "^2.0.0",
"tape": "^5.5.3"
},
"dependencies": {
"function-bind": "^1.1.1",
"has-bigints": "^1.0.1",
"has-symbols": "^1.0.2",
"call-bind": "^1.0.2",
"has-bigints": "^1.0.2",
"has-symbols": "^1.0.3",
"which-boxed-primitive": "^1.0.2"

@@ -56,0 +57,0 @@ },

@@ -1,9 +0,11 @@

# unbox-primitive <sup>[![Version Badge][2]][1]</sup>
# unbox-primitive <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
[![npm badge][npm-badge-png]][package-url]

@@ -31,9 +33,9 @@ Unbox a boxed JS primitive value. This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and works despite ES6 Symbol.toStringTag.

[1]: https://npmjs.org/package/unbox-primitive
[2]: https://versionbadg.es/ljharb/unbox-primitive.svg
[5]: https://david-dm.org/ljharb/unbox-primitive.svg
[6]: https://david-dm.org/ljharb/unbox-primitive
[7]: https://david-dm.org/ljharb/unbox-primitive/dev-status.svg
[8]: https://david-dm.org/ljharb/unbox-primitive#info=devDependencies
[11]: https://nodei.co/npm/unbox-primitive.png?downloads=true&stars=true
[package-url]: https://npmjs.org/package/unbox-primitive
[npm-version-svg]: https://versionbadg.es/ljharb/unbox-primitive.svg
[deps-svg]: https://david-dm.org/ljharb/unbox-primitive.svg
[deps-url]: https://david-dm.org/ljharb/unbox-primitive
[dev-deps-svg]: https://david-dm.org/ljharb/unbox-primitive/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/unbox-primitive#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/unbox-primitive.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/unbox-primitive.svg

@@ -43,1 +45,5 @@ [license-url]: LICENSE

[downloads-url]: https://npm-stat.com/charts.html?package=unbox-primitive
[codecov-image]: https://codecov.io/gh/ljharb/unbox-primitive/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/unbox-primitive/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/unbox-primitive
[actions-url]: https://github.com/ljharb/unbox-primitive/actions
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc