Have ideas to improve npm?Join in the discussion! »

    @triniwiz/nativescript-supabase
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    Nativescript nativescript-supabase

    ns plugin add @triniwiz/nativescript-supabase

    Usage

    Database

    import {createClient} from '@triniwiz/nativescript-supabase';
    
    const client = createClient('supabaseUrl', 'supabaseKey');
    
      // Select from table `countries` ordering by `name`
      const response = await client
          .from('countries')
          .select()
          .order('name', ascending: true)
          .execute();
    }

    Authentication

    import {createClient} from '@triniwiz/nativescript-supabase';
    
    const client = createClient('supabaseUrl', 'supabaseKey');
    
    // Sign up user with email and password
    const response = await client.auth.signUp('email', 'password');

    Storage

    import {File as nsFile, knownFolders, path} from '@nativescript/core';
    import {createClient} from '@triniwiz/nativescript-supabase';
    
     const client = createClient('supabaseUrl', 'supabaseKey');
      
      // Create file `example.txt` and upload it in `public` bucket
      const exampleText = path.join(knownFolders.documents().path, 'example.txt');
      const file = nsFile.fromPath(exampleText);
      file.writeTextSync('File content');
      const storageResponse = await client
          .storage
          .from('public')
          .upload('example.txt', exampleText);

    Check out the Official Documentation to learn all the other available methods.

    Credits

    Based on supabase-js

    License

    Apache License Version 2.0

    Install

    npm i @triniwiz/nativescript-supabase

    DownloadsWeekly Downloads

    2

    Version

    0.1.0

    License

    Apache-2.0

    Unpacked Size

    39.9 kB

    Total Files

    27

    Last publish

    Collaborators

    • avatar