BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/any-promise
Run
Logout
Edit File
Size: 2.52 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/any-promise/loader.js
Text
Base64
"use strict" // global key for user preferred registration var REGISTRATION_KEY = '@@any-promise/REGISTRATION', // Prior registration (preferred or detected) registered = null /** * Registers the given implementation. An implementation must * be registered prior to any call to `require("any-promise")`, * typically on application load. * * If called with no arguments, will return registration in * following priority: * * For Node.js: * * 1. Previous registration * 2. global.Promise if node.js version >= 0.12 * 3. Auto detected promise based on first sucessful require of * known promise libraries. Note this is a last resort, as the * loaded library is non-deterministic. node.js >= 0.12 will * always use global.Promise over this priority list. * 4. Throws error. * * For Browser: * * 1. Previous registration * 2. window.Promise * 3. Throws error. * * Options: * * Promise: Desired Promise constructor * global: Boolean - Should the registration be cached in a global variable to * allow cross dependency/bundle registration? (default true) */ module.exports = function(root, loadImplementation){ return function register(implementation, opts){ implementation = implementation || null opts = opts || {} // global registration unless explicitly {global: false} in options (default true) var registerGlobal = opts.global !== false; // load any previous global registration if(registered === null && registerGlobal){ registered = root[REGISTRATION_KEY] || null } if(registered !== null && implementation !== null && registered.implementation !== implementation){ // Throw error if attempting to redefine implementation throw new Error('any-promise already defined as "'+registered.implementation+ '". You can only register an implementation before the first '+ ' call to require("any-promise") and an implementation cannot be changed') } if(registered === null){ // use provided implementation if(implementation !== null && typeof opts.Promise !== 'undefined'){ registered = { Promise: opts.Promise, implementation: implementation } } else { // require implementation if implementation is specified but not provided registered = loadImplementation(implementation) } if(registerGlobal){ // register preference globally in case multiple installations root[REGISTRATION_KEY] = registered } } return registered } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 14
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
register
DIR
-
drwxr-xr-x
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.jshintrc
35 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.npmignore
60 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
implementation.d.ts
62 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
implementation.js
56 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.d.ts
5.23 KB
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
49 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.04 KB
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
loader.js
2.52 KB
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
optional.js
118 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
1017 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
6.90 KB
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
register-shim.js
545 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
register.d.ts
362 B
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
register.js
2.84 KB
lrw-r--r--
2025-03-28 11:04:31
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).