Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

object-assign

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-assign - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

15

index.js

@@ -0,3 +1,10 @@

/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
'use strict';
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;

@@ -23,3 +30,3 @@ var propIsEnumerable = Object.prototype.propertyIsEnumerable;

// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';

@@ -53,3 +60,3 @@ if (Object.getOwnPropertyNames(test1)[0] === '5') {

return true;
} catch (e) {
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.

@@ -74,4 +81,4 @@ return false;

if (Object.getOwnPropertySymbols) {
symbols = Object.getOwnPropertySymbols(from);
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {

@@ -78,0 +85,0 @@ if (propIsEnumerable.call(from, symbols[i])) {

{
"name": "object-assign",
"version": "4.1.0",
"description": "ES2015 Object.assign() ponyfill",
"version": "4.1.1",
"description": "ES2015 `Object.assign()` ponyfill",
"license": "MIT",

@@ -16,3 +16,3 @@ "repository": "sindresorhus/object-assign",

"scripts": {
"test": "xo && mocha",
"test": "xo && ava",
"bench": "matcha bench.js"

@@ -38,7 +38,7 @@ },

"devDependencies": {
"lodash": "^4.8.2",
"ava": "^0.16.0",
"lodash": "^4.16.4",
"matcha": "^0.7.0",
"mocha": "*",
"xo": "*"
"xo": "^0.16.0"
}
}
# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) ponyfill
> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
> Ponyfill: A polyfill that doesn't overwrite the native method
## Use the built-in
Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
support `Object.assign()` :tada:. If you target only those environments, then by all
means, use `Object.assign()` instead of this package.
## Install

@@ -39,3 +44,3 @@

### objectAssign(target, source, [source, ...])
### objectAssign(target, [source, ...])

@@ -42,0 +47,0 @@ Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.

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