sprintf.js icon indicating copy to clipboard operation
sprintf.js copied to clipboard

Pass name when calling define()

Open avalez opened this issue 10 years ago • 0 comments

Currently anonymous define() in sprintf.js:line 183 (see below) causes problems: a) with require.js: http://requirejs.org/docs/errors.html#mismatch) b) with almond.js: Uncaught TypeError: Cannot read property 'splice' of undefined almond.js:413

    if (typeof define === "function" && define.amd) {
        define(function() {
            return {
                sprintf: sprintf,
                vsprintf: vsprintf
            }
        })
    }

Could you please pass a name as first argument when calling define()?

avalez avatar Nov 21 '14 13:11 avalez