class="name"> 16793 058f31828c first commit vor 1 Jahr 16795 058f31828c first commit vor 1 Jahr 16797 058f31828c first commit vor 1 Jahr 16800 058f31828c first commit vor 1 Jahr 16802 058f31828c first commit vor 1 Jahr 16803 058f31828c first commit vor 1 Jahr 16805 058f31828c first commit vor 1 Jahr 16807 058f31828c first commit vor 1 Jahr 16810 058f31828c first commit vor 1 Jahr 16812 058f31828c first commit vor 1 Jahr 16814 058f31828c first commit vor 1 Jahr 16817 058f31828c first commit vor 1 Jahr 16819 058f31828c first commit vor 1 Jahr 16821 058f31828c first commit vor 1 Jahr 16824 058f31828c first commit vor 1 Jahr 16831 058f31828c first commit vor 1 Jahr 16832 058f31828c first commit vor 1 Jahr 16843 058f31828c first commit vor 1 Jahr 16844 058f31828c first commit vor 1 Jahr 16850 058f31828c first commit vor 1 Jahr 16856 058f31828c first commit vor 1 Jahr 16862 058f31828c first commit vor 1 Jahr 16868 058f31828c first commit vor 1 Jahr 16869 058f31828c first commit vor 1 Jahr 16871 058f31828c first commit vor 1 Jahr 16874 058f31828c first commit vor 1 Jahr 16876 058f31828c first commit vor 1 Jahr 16877 058f31828c first commit vor 1 Jahr 16879 058f31828c first commit vor 1 Jahr 16887 058f31828c first commit vor 1 Jahr 16889 058f31828c first commit vor 1 Jahr 16892 058f31828c first commit vor 1 Jahr 16896 058f31828c first commit vor 1 Jahr 16898 058f31828c first commit vor 1 Jahr 16901 058f31828c first commit vor 1 Jahr 16903 058f31828c first commit vor 1 Jahr 16911 058f31828c first commit vor 1 Jahr 16917 058f31828c first commit vor 1 Jahr 16918 058f31828c first commit vor 1 Jahr 16922 058f31828c first commit vor 1 Jahr 16924 058f31828c first commit vor 1 Jahr 16926 058f31828c first commit vor 1 Jahr 16927 058f31828c first commit vor 1 Jahr 16928 058f31828c first commit vor 1 Jahr 16929 058f31828c first commit vor 1 Jahr 16932 058f31828c first commit vor 1 Jahr 16934 058f31828c first commit vor 1 Jahr 16941 058f31828c first commit vor 1 Jahr 16942 058f31828c first commit vor 1 Jahr 16944 058f31828c first commit vor 1 Jahr 16947 058f31828c first commit vor 1 Jahr 16949 058f31828c first commit vor 1 Jahr 16951 058f31828c first commit vor 1 Jahr 16952 058f31828c first commit vor 1 Jahr 16962 058f31828c first commit vor 1 Jahr 16964 058f31828c first commit vor 1 Jahr 16967 058f31828c first commit vor 1 Jahr 16969 058f31828c first commit vor 1 Jahr 16971 058f31828c first commit vor 1 Jahr 16974 058f31828c first commit vor 1 Jahr 16976 058f31828c first commit vor 1 Jahr 16978 058f31828c first commit vor 1 Jahr 16981 058f31828c first commit vor 1 Jahr 16983 058f31828c first commit vor 1 Jahr 16984 058f31828c first commit vor 1 Jahr 16986 058f31828c first commit vor 1 Jahr 16996 058f31828c first commit vor 1 Jahr 17008 058f31828c first commit vor 1 Jahr 17009 058f31828c first commit vor 1 Jahr 17020 058f31828c first commit vor 1 Jahr 17021 058f31828c first commit vor 1 Jahr 17022 058f31828c first commit vor 1 Jahr 17024 058f31828c first commit vor 1 Jahr 17034 058f31828c first commit vor 1 Jahr 17037 058f31828c first commit vor 1 Jahr 17039 058f31828c first commit vor 1 Jahr 17040 058f31828c first commit vor 1 Jahr 17041 058f31828c first commit vor 1 Jahr 17042 058f31828c first commit vor 1 Jahr 174 058f31828c first commit vor 1 Jahr 175 058f31828c first commit vor 1 Jahr 2187 058f31828c first commit vor 1 Jahr 2224 058f31828c first commit vor 1 Jahr 2328 058f31828c first commit vor 1 Jahr 2336 058f31828c first commit vor 1 Jahr 2337 058f31828c first commit vor 1 Jahr 2579 058f31828c first commit vor 1 Jahr 2600 058f31828c first commit vor 1 Jahr 2600_fsm 058f31828c first commit vor 1 Jahr 2600_vm 058f31828c first commit vor 1 Jahr 2601 058f31828c first commit vor 1 Jahr 2601_fsm 058f31828c first commit vor 1 Jahr 2601_vm 058f31828c first commit vor 1 Jahr 2602 058f31828c first commit vor 1 Jahr 2602_fsm 058f31828c first commit vor 1 Jahr 2602_vm 058f31828c first commit vor 1 Jahr 2603 058f31828c first commit vor 1 Jahr 2603_fsm 058f31828c first commit vor 1 Jahr 2603_vm 058f31828c first commit vor 1 Jahr 2604 058f31828c first commit vor 1 Jahr 2605 058f31828c first commit vor 1 Jahr 2605_fsm 058f31828c first commit vor 1 Jahr 2605_vm 058f31828c first commit vor 1 Jahr 2606 058f31828c first commit vor 1 Jahr 2606_fsm 058f31828c first commit vor 1 Jahr 2606_vm 058f31828c first commit vor 1 Jahr 2607 058f31828c first commit vor 1 Jahr 2607_fsm 058f31828c first commit vor 1 Jahr 2607_vm 058f31828c first commit vor 1 Jahr 2608 058f31828c first commit vor 1 Jahr 2608_fsm 058f31828c first commit vor 1 Jahr 2608_vm 058f31828c first commit vor 1 Jahr 2609 058f31828c first commit vor 1 Jahr 2609_fsm 058f31828c first commit vor 1 Jahr 2609_vm 058f31828c first commit vor 1 Jahr 2610 058f31828c first commit vor 1 Jahr 2610_fsm 058f31828c first commit vor 1 Jahr 2610_vm 058f31828c first commit vor 1 Jahr 2611 058f31828c first commit vor 1 Jahr 2612 058f31828c first commit vor 1 Jahr 2612_fsm 058f31828c first commit vor 1 Jahr 2612_vm 058f31828c first commit vor 1 Jahr 2613 058f31828c first commit vor 1 Jahr 2615 058f31828c first commit vor 1 Jahr 2615_fsm 058f31828c first commit vor 1 Jahr 2615_vm 058f31828c first commit vor 1 Jahr 2616 058f31828c first commit vor 1 Jahr 2616_fsm 058f31828c first commit vor 1 Jahr 2616_vm 058f31828c first commit vor 1 Jahr 2617 058f31828c first commit vor 1 Jahr 2617_fsm 058f31828c first commit vor 1 Jahr 2617_vm 058f31828c first commit vor 1 Jahr 2618 058f31828c first commit vor 1 Jahr 2618_fsm 058f31828c first commit vor 1 Jahr 2618_vm 058f31828c first commit vor 1 Jahr 2619 058f31828c first commit vor 1 Jahr 2619_fsm 058f31828c first commit vor 1 Jahr 2619_vm 058f31828c first commit vor 1 Jahr 2620 058f31828c first commit vor 1 Jahr 2620_fsm 058f31828c first commit vor 1 Jahr 2650 058f31828c first commit vor 1 Jahr 2651 058f31828c first commit vor 1 Jahr 2652 058f31828c first commit vor 1 Jahr 2653 058f31828c first commit vor 1 Jahr 2654 058f31828c first commit vor 1 Jahr 2655 058f31828c first commit vor 1 Jahr 2656 058f31828c first commit vor 1 Jahr 2657 058f31828c first commit vor 1 Jahr 2658 058f31828c first commit vor 1 Jahr 2659 058f31828c first commit vor 1 Jahr 2660 058f31828c first commit vor 1 Jahr 2661 058f31828c first commit vor 1 Jahr 2662 058f31828c first commit vor 1 Jahr 2663 058f31828c first commit vor 1 Jahr 2664 058f31828c first commit vor 1 Jahr 2665 058f31828c first commit vor 1 Jahr 2666 058f31828c first commit vor 1 Jahr 2667 058f31828c first commit vor 1 Jahr 2668 058f31828c first commit vor 1 Jahr 2669 058f31828c first commit vor 1 Jahr 2670 058f31828c first commit vor 1 Jahr 2673 058f31828c first commit vor 1 Jahr 2674 058f31828c first commit vor 1 Jahr 2675 058f31828c first commit vor 1 Jahr 2678 058f31828c first commit vor 1 Jahr 2679 058f31828c first commit vor 1 Jahr 2680 058f31828c first commit vor 1 Jahr 2681 058f31828c first commit vor 1 Jahr 2682 058f31828c first commit vor 1 Jahr 2683 058f31828c first commit vor 1 Jahr 2684 058f31828c first commit vor 1 Jahr 2685 058f31828c first commit vor 1 Jahr 2686 058f31828c first commit vor 1 Jahr 2687 058f31828c first commit vor 1 Jahr 2688 058f31828c first commit vor 1 Jahr 2689 058f31828c first commit vor 1 Jahr 2690 058f31828c first commit vor 1 Jahr 2691 058f31828c first commit vor 1 Jahr 2692 058f31828c first commit vor 1 Jahr 2693 058f31828c first commit vor 1 Jahr 2696 058f31828c first commit vor 1 Jahr 2699 058f31828c first commit vor 1 Jahr 2701 058f31828c first commit vor 1 Jahr 2702 058f31828c first commit vor 1 Jahr 2703 058f31828c first commit vor 1 Jahr 2704 058f31828c first commit vor 1 Jahr 2753 058f31828c first commit vor 1 Jahr 2753_fsm 058f31828c first commit vor 1 Jahr 2753_vm 058f31828c first commit vor 1 Jahr 2754 058f31828c first commit vor 1 Jahr 2755 058f31828c first commit vor 1 Jahr 2756 058f31828c first commit vor 1 Jahr 2757 058f31828c first commit vor 1 Jahr 2830 058f31828c first commit vor 1 Jahr 2831 058f31828c first commit vor 1 Jahr 2832 058f31828c first commit vor 1 Jahr 2833 058f31828c first commit vor 1 Jahr 2834 058f31828c first commit vor 1 Jahr 2835 058f31828c first commit vor 1 Jahr 2836 058f31828c first commit vor 1 Jahr 2837 058f31828c first commit vor 1 Jahr 2838 058f31828c first commit vor 1 Jahr 2838_fsm 058f31828c first commit vor 1 Jahr 2838_vm 058f31828c first commit vor 1 Jahr 2839 058f31828c first commit vor 1 Jahr 2840 058f31828c first commit vor 1 Jahr 2840_fsm 058f31828c first commit vor 1 Jahr 2840_vm 058f31828c first commit vor 1 Jahr 2841 058f31828c first commit vor 1 Jahr 2995 058f31828c first commit vor 1 Jahr 2996 058f31828c first commit vor 1 Jahr 3079 058f31828c first commit vor 1 Jahr 3079_fsm 058f31828c first commit vor 1 Jahr 3079_vm 058f31828c first commit vor 1 Jahr 3080 058f31828c first commit vor 1 Jahr 3081 058f31828c first commit vor 1 Jahr 3085 058f31828c first commit vor 1 Jahr 3118 058f31828c first commit vor 1 Jahr 3119 058f31828c first commit vor 1 Jahr 3164 058f31828c first commit vor 1 Jahr 3256 058f31828c first commit vor 1 Jahr 3257 058f31828c first commit vor 1 Jahr 3258 058f31828c first commit vor 1 Jahr 3350 058f31828c first commit vor 1 Jahr 3351 058f31828c first commit vor 1 Jahr 3379 058f31828c first commit vor 1 Jahr 3380 058f31828c first commit vor 1 Jahr 3381 058f31828c first commit vor 1 Jahr 3394 058f31828c first commit vor 1 Jahr 3394_fsm 058f31828c first commit vor 1 Jahr 3394_vm 058f31828c first commit vor 1 Jahr 3395 058f31828c first commit vor 1 Jahr 3429 058f31828c first commit vor 1 Jahr 3430 058f31828c first commit vor 1 Jahr 3431 058f31828c first commit vor 1 Jahr 3433 058f31828c first commit vor 1 Jahr 3439 058f31828c first commit vor 1 Jahr 3440 058f31828c first commit vor 1 Jahr 3455 058f31828c first commit vor 1 Jahr 3456 058f31828c first commit vor 1 Jahr 3456_fsm 058f31828c first commit vor 1 Jahr 3456_vm 058f31828c first commit vor 1 Jahr 3466 058f31828c first commit vor 1 Jahr 3467 058f31828c first commit vor 1 Jahr 3468 058f31828c first commit vor 1 Jahr 3501 058f31828c first commit vor 1 Jahr 3502 058f31828c first commit vor 1 Jahr 3503 058f31828c first commit vor 1 Jahr 3534 058f31828c first commit vor 1 Jahr 3541 058f31828c first commit vor 1 Jahr 3541_fsm 058f31828c first commit vor 1 Jahr 3541_vm 058f31828c first commit vor 1 Jahr 3542 058f31828c first commit vor 1 Jahr 3574 058f31828c first commit vor 1 Jahr 3575 058f31828c first commit vor 1 Jahr 3576 058f31828c first commit vor 1 Jahr 3596 058f31828c first commit vor 1 Jahr 3597 058f31828c first commit vor 1 Jahr 3598 058f31828c first commit vor 1 Jahr 3599 058f31828c first commit vor 1 Jahr 3600 058f31828c first commit vor 1 Jahr 3600_fsm 058f31828c first commit vor 1 Jahr 3600_vm 058f31828c first commit vor 1 Jahr 3601 058f31828c first commit vor 1 Jahr 3601_fsm 058f31828c first commit vor 1 Jahr 3601_vm 058f31828c first commit vor 1 Jahr 3602 058f31828c first commit vor 1 Jahr 3602_fsm 058f31828c first commit vor 1 Jahr 3602_vm 058f31828c first commit vor 1 Jahr 3603 058f31828c first commit vor 1 Jahr 3603_fsm 058f31828c first commit vor 1 Jahr 3603_vm 058f31828c first commit vor 1 Jahr 3604 058f31828c first commit vor 1 Jahr 3605 058f31828c first commit vor 1 Jahr 3606 058f31828c first commit vor 1 Jahr 3607 058f31828c first commit vor 1 Jahr 3608 058f31828c first commit vor 1 Jahr 3609 058f31828c first commit vor 1 Jahr 3712 058f31828c first commit vor 1 Jahr 3764 058f31828c first commit vor 1 Jahr 3764_fsm 058f31828c first commit vor 1 Jahr 3764_vm 058f31828c first commit vor 1 Jahr 3766 058f31828c first commit vor 1 Jahr 3767 058f31828c first commit vor 1 Jahr 3997 058f31828c first commit vor 1 Jahr 4143 058f31828c first commit vor 1 Jahr 4144 058f31828c first commit vor 1 Jahr 4145 058f31828c first commit vor 1 Jahr 4146 058f31828c first commit vor 1 Jahr 4147 058f31828c first commit vor 1 Jahr 4148 058f31828c first commit vor 1 Jahr 4149 058f31828c first commit vor 1 Jahr 4150 058f31828c first commit vor 1 Jahr 4151 058f31828c first commit vor 1 Jahr 4152 058f31828c first commit vor 1 Jahr 4153 058f31828c first commit vor 1 Jahr 4154 058f31828c first commit vor 1 Jahr 4155 058f31828c first commit vor 1 Jahr 4156 058f31828c first commit vor 1 Jahr 4157 058f31828c first commit vor 1 Jahr 4158 058f31828c first commit vor 1 Jahr 4159 058f31828c first commit vor 1 Jahr 4160 058f31828c first commit vor 1 Jahr 4161 058f31828c first commit vor 1 Jahr 4162 058f31828c first commit vor 1 Jahr 4163 058f31828c first commit vor 1 Jahr 4164 058f31828c first commit vor 1 Jahr 4165 058f31828c first commit vor 1 Jahr 4166 058f31828c first commit vor 1 Jahr 4167 058f31828c first commit vor 1 Jahr 4168 058f31828c first commit vor 1 Jahr 4169 058f31828c first commit vor 1 Jahr 4170 058f31828c first commit vor 1 Jahr 4171 058f31828c first commit vor 1 Jahr 4172 058f31828c first commit vor 1 Jahr 4173 058f31828c first commit vor 1 Jahr 4174 058f31828c first commit vor 1 Jahr 5002 058f31828c first commit vor 1 Jahr 548 058f31828c first commit vor 1 Jahr 549 058f31828c first commit vor 1 Jahr 6102 058f31828c first commit vor 1 Jahr 6104 058f31828c first commit vor 1 Jahr 6106 058f31828c first commit vor 1 Jahr 6110 058f31828c first commit vor 1 Jahr 6111 058f31828c first commit vor 1 Jahr 6112 058f31828c first commit vor 1 Jahr 6113 058f31828c first commit vor 1 Jahr 6117 058f31828c first commit vor 1 Jahr 826 058f31828c first commit vor 1 Jahr 827 058f31828c first commit vor 1 Jahr 828 058f31828c first commit vor 1 Jahr PG_VERSION 058f31828c first commit vor 1 Jahr pg_filenode.map 058f31828c first commit vor 1 Jahr pg_internal.init 058f31828c first commit vor 1 Jahr tmt/tiger_frontend - Gogs: Simplico Git Service

Sin descripción

golf 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
..
register 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
.jshintrc 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
.npmignore 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
LICENSE 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
README.md 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
implementation.d.ts 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
implementation.js 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
index.d.ts 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
index.js 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
loader.js 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
optional.js 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
package.json 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
register-shim.js 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
register.d.ts 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años
register.js 77628cf8bf first comm %!s(int64=3) %!d(string=hace) años

README.md

Any Promise

Build Status

Let your library support any ES 2015 (ES6) compatible Promise and leave the choice to application authors. The application can optionally register its preferred Promise implementation and it will be exported when requiring any-promise from library code.

If no preference is registered, defaults to the global Promise for newer Node.js versions. The browser version defaults to the window Promise, so polyfill or register as necessary.

Usage with global Promise:

Assuming the global Promise is the desired implementation:

# Install any libraries depending on any-promise
$ npm install mz

The installed libraries will use global Promise by default.

// in library
var Promise = require('any-promise')  // the global Promise

function promiseReturningFunction(){
    return new Promise(function(resolve, reject){...})
}

Usage with registration:

Assuming bluebird is the desired Promise implementation:

# Install preferred promise library
$ npm install bluebird
# Install any-promise to allow registration
$ npm install any-promise
# Install any libraries you would like to use depending on any-promise
$ npm install mz

Register your preference in the application entry point before any other require of packages that load any-promise:

// top of application index.js or other entry point
require('any-promise/register/bluebird')

// -or- Equivalent to above, but allows customization of Promise library
require('any-promise/register')('bluebird', {Promise: require('bluebird')})

Now that the implementation is registered, you can use any package depending on any-promise:

var fsp = require('mz/fs') // mz/fs will use registered bluebird promises
var Promise = require('any-promise')  // the registered bluebird promise 

It is safe to call register multiple times, but it must always be with the same implementation.

Again, registration is optional. It should only be called by the application user if overriding the global Promise implementation is desired.

Optional Application Registration

As an application author, you can optionally register a preferred Promise implementation on application startup (before any call to require('any-promise'):

You must register your preference before any call to require('any-promise') (by you or required packages), and only one implementation can be registered. Typically, this registration would occur at the top of the application entry point.

Registration shortcuts

If you are using a known Promise implementation, you can register your preference with a shortcut:

require('any-promise/register/bluebird')
// -or-
import 'any-promise/register/q';

Shortcut registration is the preferred registration method as it works in the browser and Node.js. It is also convenient for using with import and many test runners, that offer a --require flag:

$ ava --require=any-promise/register/bluebird test.js

Current known implementations include bluebird, q, when, rsvp, es6-promise, promise, native-promise-only, pinkie, vow and lie. If you are not using a known implementation, you can use another registration method described below.

Basic Registration

As an alternative to registration shortcuts, you can call the register function with the preferred Promise implementation. The benefit of this approach is that a Promise library can be required by name without being a known implementation. This approach does NOT work in the browser. To use any-promise in the browser use either registration shortcuts or specify the Promise constructor using advanced registration (see below).

require('any-promise/register')('when')
// -or- require('any-promise/register')('any other ES6 compatible library (known or otherwise)')

This registration method will try to detect the Promise constructor from requiring the specified implementation. If you would like to specify your own constructor, see advanced registration.

Advanced Registration

To use the browser version, you should either install a polyfill or explicitly register the Promise constructor:

require('any-promise/register')('bluebird', {Promise: require('bluebird')})

This could also be used for registering a custom Promise implementation or subclass.

Your preference will be registered globally, allowing a single registration even if multiple versions of any-promise are installed in the NPM dependency tree or are using multiple bundled JavaScript files in the browser. You can bypass this global registration in options:

require('../register')('es6-promise', {Promise: require('es6-promise').Promise, global: false})

Library Usage

To use any Promise constructor, simply require it:

var Promise = require('any-promise');

return Promise
  .all([xf, f, init, coll])
  .then(fn);


return new Promise(function(resolve, reject){
  try {
    resolve(item);
  } catch(e){
    reject(e);
  }
});

Except noted below, libraries using any-promise should only use documented functions as there is no guarantee which implementation will be chosen by the application author. Libraries should never call register, only the application user should call if desired.

Advanced Library Usage

If your library needs to branch code based on the registered implementation, you can retrieve it using var impl = require('any-promise/implementation'), where impl will be the package name ("bluebird", "when", etc.) if registered, "global.Promise" if using the global version on Node.js, or "window.Promise" if using the browser version. You should always include a default case, as there is no guarantee what package may be registered.

Support for old Node.js versions

Node.js versions prior to v0.12 may have contained buggy versions of the global Promise. For this reason, the global Promise is not loaded automatically for these old versions. If using any-promise in Node.js versions versions <= v0.12, the user should register a desired implementation.

If an implementation is not registered, any-promise will attempt to discover an installed Promise implementation. If no implementation can be found, an error will be thrown on require('any-promise'). While the auto-discovery usually avoids errors, it is non-deterministic. It is recommended that the user always register a preferred implementation for older Node.js versions.

This auto-discovery is only available for Node.jS versions prior to v0.12. Any newer versions will always default to the global Promise implementation.

Related