- 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>
31 lines
559 B
JavaScript
31 lines
559 B
JavaScript
/*!
|
|
* array-last <https://github.com/jonschlinkert/array-last>
|
|
*
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
* Released under the MIT License.
|
|
*/
|
|
|
|
var isNumber = require('is-number');
|
|
|
|
module.exports = function last(arr, n) {
|
|
if (!Array.isArray(arr)) {
|
|
throw new Error('expected the first argument to be an array');
|
|
}
|
|
|
|
var len = arr.length;
|
|
if (len === 0) {
|
|
return null;
|
|
}
|
|
|
|
n = isNumber(n) ? +n : 1;
|
|
if (n === 1) {
|
|
return arr[len - 1];
|
|
}
|
|
|
|
var res = new Array(n);
|
|
while (n--) {
|
|
res[n] = arr[--len];
|
|
}
|
|
return res;
|
|
};
|