You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
716 B
31 lines
716 B
'use strict';
|
|
|
|
var bach = require('bach');
|
|
|
|
var metadata = require('./helpers/metadata');
|
|
var buildTree = require('./helpers/buildTree');
|
|
var normalizeArgs = require('./helpers/normalizeArgs');
|
|
var createExtensions = require('./helpers/createExtensions');
|
|
|
|
function series() {
|
|
var create = this._settle ? bach.settleSeries : bach.series;
|
|
|
|
var args = normalizeArgs(this._registry, arguments);
|
|
var extensions = createExtensions(this);
|
|
var fn = create(args, extensions);
|
|
var name = '<series>';
|
|
|
|
metadata.set(fn, {
|
|
name: name,
|
|
branch: true,
|
|
tree: {
|
|
label: name,
|
|
type: 'function',
|
|
branch: true,
|
|
nodes: buildTree(args),
|
|
},
|
|
});
|
|
return fn;
|
|
}
|
|
|
|
module.exports = series;
|
|
|