- 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
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
module.exports = function archy (obj, prefix, opts) {
|
|
if (prefix === undefined) prefix = '';
|
|
if (!opts) opts = {};
|
|
var chr = function (s) {
|
|
var chars = {
|
|
'│' : '|',
|
|
'└' : '`',
|
|
'├' : '+',
|
|
'─' : '-',
|
|
'┬' : '-'
|
|
};
|
|
return opts.unicode === false ? chars[s] : s;
|
|
};
|
|
|
|
if (typeof obj === 'string') obj = { label : obj };
|
|
|
|
var nodes = obj.nodes || [];
|
|
var lines = (obj.label || '').split('\n');
|
|
var splitter = '\n' + prefix + (nodes.length ? chr('│') : ' ') + ' ';
|
|
|
|
return prefix
|
|
+ lines.join(splitter) + '\n'
|
|
+ nodes.map(function (node, ix) {
|
|
var last = ix === nodes.length - 1;
|
|
var more = node.nodes && node.nodes.length;
|
|
var prefix_ = prefix + (last ? ' ' : chr('│')) + ' ';
|
|
|
|
return prefix
|
|
+ (last ? chr('└') : chr('├')) + chr('─')
|
|
+ (more ? chr('┬') : chr('─')) + ' '
|
|
+ archy(node, prefix_, opts).slice(prefix.length + 2)
|
|
;
|
|
}).join('')
|
|
;
|
|
};
|