How to use the deferred.some function in deferred

To help you get started, we’ve selected a few deferred 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 medikoo / modules-webmake / lib / parser.js View on Github external
const resolveExtTypePath = (path, ext) => {
			const exts = extNames[ext];
			if (!exts.length) {
				throw new Error(`Module '${ orgFn }' not found, as required in '${ fromfile }'`);
			}
			return deferred.some(exts, fileExt =>
				statP(path + fileExt)(
					stats => {
						if (stats.isFile()) {
							path += fileExt;
							return true;
						}
						return false;
					},
					err => {
						if (err.code !== "ENOENT") throw err;
						return false;
					}
				)
			)(found => {
				if (!found) {
					throw new Error(

deferred

Modular and fast Promises implementation

ISC
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis