- Add Strike API credentials configuration - Implement Strike node with 9 resources (Account, Balance, Currency Exchange, Deposit, Invoice, Payment, Payment Method, Payout, Rates) - Add comprehensive operation descriptions for all resources - Include CLAUDE.MD documentation - Set up build configuration with TypeScript, ESLint, and Prettier 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
36 lines
747 B
JavaScript
36 lines
747 B
JavaScript
'use strict';
|
|
|
|
var each = require('array-each');
|
|
var slice = require('array-slice');
|
|
var forOwn = require('for-own');
|
|
var isObject = require('isobject');
|
|
|
|
/**
|
|
* Extends the `target` object with properties of one or
|
|
* more additional `objects`
|
|
*
|
|
* @name .defaults
|
|
* @param {Object} `target` The target object. Pass an empty object to shallow clone.
|
|
* @param {Object} `objects`
|
|
* @return {Object}
|
|
* @api public
|
|
*/
|
|
|
|
module.exports = function defaults(target, objects) {
|
|
if (target == null) {
|
|
return {};
|
|
}
|
|
|
|
each(slice(arguments, 1), function(obj) {
|
|
if (isObject(obj)) {
|
|
forOwn(obj, function(val, key) {
|
|
if (target[key] == null) {
|
|
target[key] = val;
|
|
}
|
|
});
|
|
}
|
|
});
|
|
|
|
return target;
|
|
};
|