How to use the infusion.makeArray function in infusion

To help you get started, we’ve selected a few infusion examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GPII / universal / gpii / node_modules / testing / src / RunTestDefs.js View on Github external
gpii.test.buildSingleTestFixture = function (testDef, rootGrades) {
    testDef.gradeNames = fluid.makeArray(testDef.gradeNames).concat(fluid.makeArray(rootGrades));

    // TODO: Discuss whether this is useful/advisable.
    testDef.expect = testDef.initialState ? 6 : 5;

    testDef.sequenceGrade = testDef.initialState ? "gpii.test.initialStateSequenceGrade" : "gpii.test.snapshotSequenceGrade";

    return testDef;
};
github GPII / universal / gpii / node_modules / ontologyHandler / src / ontologyHandler.js View on Github external
fluid.each(secondary.contexts, function (context, contextId) {
            var mcontext = master.contexts[contextId];
            // if not in master, just copy over from secondary:
            if (!mcontext) {
                master.contexts[contextId] = context;
            } else {
                // preferences and metadata should be the only things varying
                fluid.extend(true, mcontext.preferences, context.preferences);
                mcontext.metadata = fluid.makeArray(mcontext.metadata).concat(fluid.makeArray(context.metadata));
            }
        });
github GPII / universal / gpii / node_modules / gpiiFramework / dataSource.js View on Github external
that[method] = function () {
                var promise = deferred.promise, promiseImpl = {},
                    args = fluid.makeArray(arguments);

                // We can not directly modify when's then method. It is set to
                // be non-writable (Throws TypeError if we try to assignment operator).
                promiseImpl.then = function (callback) {
                    callback = that.callbackWrapper.wrap(callback);
                    promise.then.apply(null, [callback]);
                };

                args.push(that.callbackWrapper.wrap(function () {
                    deferred.resolve.apply(null, fluid.makeArray(arguments));
                }));
                that.rawSource[method].apply(null, args);

                return promiseImpl;
            };
        });
github GPII / universal / gpii / node_modules / testing / src / CloudBasedOAuth2TestsUtils.js View on Github external
gpii.test.elementsBetween = function (origArray, start, end) {
    var array = fluid.makeArray(origArray);
    start = start || 0;
    if (!end && end !== 0) {
        end = array.length;
    }
    array.length = end;
    array.splice(0, start);
    return array;
};
github GPII / universal / tests / AcceptanceTests.js View on Github external
gpii.acceptanceTesting.buildFlowManagerTestFixture = function (testDef) {
    testDef.expect = 1;
    testDef.sequence = fluid.makeArray(testDef.sequence);

    testDef.members = {
        settingsStore: {}
    };

    testDef.components = $.extend(true, testDef.components, {
        fmrequest: {
            type: "kettle.tests.request.http",
            options: {
                requestOptions: {
                    path: "/%token/settings/%appinfo",
                    port: 8081,
                    passthrough: testDef.expected
                },
                termMap: {
                    token: "{tests}.options.token",
github GPII / universal / gpii / node_modules / testing / src / CloudBasedOAuth2TestsUtils.js View on Github external
gpii.test.cloudBased.oauth2.buildTestFixtureCommon = function (testDef, commonRec, baseDir) {
    testDef = fluid.extend(true, {}, testDef, commonRec);

    testDef.sequence = fluid.makeArray(testDef.sequence);
    testDef.gradeNames = fluid.makeArray(testDef.gradeNames);
    testDef.gradeNames.push("gpii.test.cloudBased.oauth2.testCaseHolder");
    testDef.config = gpii.test.cloudBased.oauth2.gpiiConfig(baseDir);
    return testDef;
};
github GPII / universal / gpii / node_modules / testing / src / CloudBasedOAuth2TestsUtils.js View on Github external
gpii.test.cloudBased.oauth2.bootstrapDisruptedTest = function (testDefs, commonRec,
    disruptions, baseDir) {
    testDefs = fluid.makeArray(testDefs);
    return fluid.transform(disruptions, function (disruption) {
        return kettle.test.bootstrapServer(testDefs, function (testDef) {
            return gpii.test.cloudBased.oauth2.buildDisruptedFixture(testDef, commonRec, disruption, baseDir);
        });
    });
};
github GPII / universal / node_modules / jqUnit / lib / jqUnit-node.js View on Github external
jqUnit.log = function () {
    var args = fluid.makeArray(arguments);
    args.unshift("jq: ");
    console.log.apply(null, args);
};
github GPII / universal / gpii / node_modules / flowManager / src / SystemUtils.js View on Github external
gpii.arrayDifference = function (array, valuesToRemove) {
    if (!array || !valuesToRemove) {
        return;
    }
    var arrayToRemove = fluid.makeArray(valuesToRemove);
    fluid.remove_if(array, function (i) {
        return arrayToRemove.includes(i);
    });
};
github GPII / universal / gpii / node_modules / userListeners / src / pcsc.js View on Github external
fluid.each(gpii.userListeners.pcsc.knownCards, function (card) {
    card.atrs = [];
    fluid.each(fluid.makeArray(card.atr), function (atr) {
        card.atrs.push(Buffer.from(atr.replace(/\s+/g, ""), "hex"));
    });
});