Plato on Github
Report Home
node_modules/wire/lib/loader/adapter.js
Maintainability
83.53
Lines of code
26
Difficulty
16.00
Estimated Errors
0.15
Function weight
By Complexity
By SLOC
/** @license MIT License (c) copyright 2010-2013 original author or authors */ /** * Licensed under the MIT License at: * http://www.opensource.org/licenses/mit-license.php * * @author: Brian Cavalier * @author: John Hann */ (function(define) { 'use strict'; define(function(require) { var when = require('when'); // Sniff for the platform's loader return typeof exports == 'object' ? function(require) { return function(moduleId) { try { return when.resolve(require(moduleId)); } catch(e) { return when.reject(e); } }; } : function (require) { return function(moduleId) { var deferred = when.defer(); require([moduleId], deferred.resolve, deferred.reject); return deferred.promise; }; }; }); }(typeof define === 'function' ? define : function(factory) { module.exports = factory(require); }));