Skip to content

Commit

Permalink
Replace copyObject with object-assign
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Mar 28, 2016
1 parent cd38cb0 commit fef6c7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
17 changes: 2 additions & 15 deletions mac.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var path = require('path')
var fs = require('fs')

var objectAssign = require('object-assign')
var plist = require('plist')
var mv = require('mv')
var ncp = require('ncp').ncp
Expand Down Expand Up @@ -37,23 +38,9 @@ function signOptsWarning (name) {
console.warn('WARNING: osx-sign.' + name + ' will be inferred from main options')
}

function copyObject (target, source) {
if (typeof Object.assign === 'function') {
return Object.assign(target, source)
} else {
// Necessary for Node 0.12
for (var key in source) {
if (source.hasOwnProperty(key)) {
target[key] = source[key]
}
}
return target
}
}

function createSignOpts (properties, platform, app) {
// use default sign opts if osx-sign is true, otherwise clone osx-sign object
var signOpts = properties === true ? {identity: null} : copyObject({}, properties)
var signOpts = properties === true ? {identity: null} : objectAssign({}, properties)

// osx-sign options are handed off to sign module, but
// with a few additions from main options
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"mkdirp": "^0.5.0",
"mv": "^2.0.3",
"ncp": "^2.0.0",
"object-assign": "^4.0.1",
"plist": "^1.1.0",
"rcedit": "^0.3.0",
"resolve": "^1.1.6",
Expand All @@ -36,7 +37,6 @@
"devDependencies": {
"coveralls": "^2.11.6",
"nyc": "^5.6.0",
"object-assign": "^4.0.1",
"rcinfo": "^0.1.3",
"run-waterfall": "^1.1.1",
"standard": "^5.4.1",
Expand Down

0 comments on commit fef6c7b

Please sign in to comment.