How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • async.waterfall([
        async.constant(42),
        function (value, next) {
            // value === 42
        },
        //...
    ], callback);
    
    async.waterfall([
        async.constant(filename, "utf8"),
        fs.readFile,
        function (fileData, next) {
            //...
        }
        //...
    ], callback);
    
    async.auto({
        hostname: async.constant("https://server.net/"),
        port: findFreePort,
        launchServer: ["hostname", "port", function (options, cb) {
            startServer(options, cb);
        }],
        //...
    }, callback);
    Docs
  • import Constants from 'expo-constants';
    import * as Notifications from 'expo-notifications';
    
    export async function registerForPushNotificationsAsync(userId: string) {
      const expoPushToken = await Notifications.getExpoPushTokenAsync({
        experienceId: '@username/example',
      });
    
      await fetch('https://example.com/', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          userId,
          expoPushToken,
        }),
      });
    }
    
    Docs
  • async getAuthorization() {
            let token = await AsyncStorage.getItem(Constant.TOKEN_KEY);
            
            //...
    }
    
        
    /CarGuo/GSYGithubAPP apache-2.0
  • //...
    import './guides.less';
    
    const moduleName = 'wucGuides';
    
    angular
      .module(moduleName, [
        'ngTranslateAsyncLoader',
        'ovh-api-services',
        translate,
      ])
      .constant('WUC_GUIDES', wucGUIDES)
      .directive('wucGuides', wucGuidesDirective)
      .run(/* @ngTranslationsInject ./translations */);
    
    export default moduleName;
    
    /ovh-ux/ng-ovh-web-universe-components bsd-3-clause
  • const getImage = async url => {
      if (typeof url !== 'undefined') {
        const token = await AsyncStorage.getItem(Constants.MOODLE_USER_TOKEN);
        const response = await RNFetchBlob.config({
          fileCache: true,
        }).fetch('GET', url + '?token=' + token);
        return response.path();
      }
    
      return null;
    };
    
    
    /costvin15/react-native-moodlemobile MIT
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples