Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cerebral/firebase

Package Overview
Dependencies
Maintainers
5
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cerebral/firebase

Firebase provider for Cerebral

  • 5.0.0-1527015081471
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

@cerebral/firebase

Install

NPM

npm install @cerebral/firebase

Description

The Firebase provider is a Cerebral friendly wrapper around the Firebase client. By default the Firebase client is heavily event based, even just getting a value, handling authentication etc. This is useful in some types of apps, but Cerebral has a very straight forward way of thinking about side effects. You will find that a lot of the API exposed by the Firebase client is simplified!

Instantiate

providers.js

import FirebaseProvider from '@cerebral/firebase'

export const firebase = FirebaseProvider({
  config: {
    apiKey: '{apiKey}',
    authDomain: '{authDomain}',
    databaseURL: '{databaseURL}',
    storageBucket: '{storageBucket}'
  },
  // Tasks related options:
  // Prefix the specs triggered. This is useful in
  // development when multiple developers are working
  // on the same instance.
  specPrefix: 'CJ',
  // Use a different queue path.
  queuePath: 'myqueue' // default = 'queue',
  // Set to true if you are using debugger cross client
  // and server
  sendTaskExecutionDetails: false
})

Important notes

  • The Cerebral firebase provider uses dot notation to keep consistency with Cerebral itself

  • All factories supports proxies and string tag, allowing you to dynamically create paths and points to values

cancelOnDisconnect

Cancel setting a value when Firebase detects disconnect.

action

function someAction({ firebase, state }) {
  firebase.cancelOnDisconnect()
}

factory

import { cancelOnDisconnect } from '@cerebral/firebase/factories'

export default cancelOnDisconnect()

createUserWithEmailAndPassword

Register a new user with email and password.

action

import { state } from 'cerebral/proxy'

function someAction({ firebase, get }) {
  const email = get(state.register.email)
  const password = get(state.register.password)

  return firebase
    .createUserWithEmailAndPassword(email, password)
    .then((response) => {
      /*
        user: { uid: 'someuid', ... }
      */
    })
}

factory

import { state } from 'cerebral/proxy'
import { createUserWithEmailAndPassword } from '@cerebral/firebase/factories'

export default [
  createUserWithEmailAndPassword(state.newUser.email, state.newUser.password)
  /*
    PROPS: {
      response: { user: {} }
    }
  */
]

factory with paths

import { state } from 'cerebral/proxy'
import { createUserWithEmailAndPassword } from '@cerebral/firebase/factories'

export default [
  createUserWithEmailAndPassword(state.newUser.email, state.newUser.password),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

deleteFile

Use deleteFile to remove an uploaded file. Specify the containing folder and filename.

action

function someAction({ firebase, props }) {
  return firebase.deleteFile('folderName', props.fileName).then(() => {
    // No output
  })
}

factory

import { props, state, path } from 'cerebral/proxy'
import { deleteFile } from '@cerebral/firebase/factories'

export default [
  deleteFile(
    path.posts.all[props.postId],
    state.posts.all[props.postId].imageName
  ),
  // No output

  // Alternatively with explicit paths
  deleteFile(
    path.all[props.postId],
    state.posts.all[props.postId].imageName
  ),
  {
    success: [],
    error: []
  }
]

factory with paths

import { props, state, path } from 'cerebral/proxy'
import { deleteFile } from '@cerebral/firebase/factories'

export default [
  deleteFile(
    path.posts.all[props.postId],
    state.posts.all[props.postId].imageName
  ),
  {
    success: [
      // No output
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

error

The Firebase errors are passed to signal and global catch handlers, or .catch handler in your actions.

FirebaseProviderError (base)

import { FirebaseProviderError } from '@cerebral/firebase'

// Error structure
{
  name: 'HttpProviderError',
  message: 'Some firebase error message'
  stack: '...'  
}

FirebaseProviderAuthenticationError

import { FirebaseProviderAuthenticationError } from '@cerebral/firebase'

// Error structure
{
  name: 'HttpProviderError',
  message: 'Some firebase error message'
  code: 10 // firebase auth error code
  stack: '...'  
}

getDownloadURL

Will get the download url of a given file in firebase storage.

action

function someAction({ firebase, props }) {
  return firebase
    .getDownloadURL('images', `${props.path}.jpg`)
    .then((response) => {
      /*
        response: https://foo.com/myImage.jpg
      */
    })
}

factory

import { path } from 'cerebral/proxy'
import { getDownloadURL } from '@cerebral/firebase/factories'

export default [
  getDownloadURL('images', path[props.path].jpg),
  {
    success: [
      /* PROPS: { response: https://foo.com/myImage.jpg } */
    ],
    error: [
      /* PROPS: { error: { ... } } */
    ]
  }
]

getUser

Will resolve to {user: {}} if user exists. If user was redirected from Facebook/Google etc. as part of first sign in, this method will handle the confirmed registration of the user.

action

function someAction({ firebase }) {
  return firebase.getUser().then((response) => {
    /*
        user: {...},
        isRedirected: false
      */
  })
}

factory

import { getUser } from '@cerebral/firebase/factories'

export default [
  getUser()
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { getUser } from '@cerebral/firebase/factories'

export default [
  getUser(),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

linkWith{PROVIDER}

Link an anonymous account with Facebook, Google or Github.

action

function someAction({ firebase, state }) {
  return firebase
    .linkWithFacebook({
      redirect: false, // Use popup or redirect. Redirect typically for mobile
      scopes: [] // Facebook scopes to access
    })
    .then((response) => {
      /*
        name: 'Bob',
        ...
      */
    })
}

factory

import { state } from 'cerebral/proxy'
import { linkWithFacebook } from '@cerebral/firebase/factories'

export default [
  linkWithFacebook({
    redirect: state.useragent.media.small
  })
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { state } from 'cerebral/proxy'
import { linkWithFacebook } from '@cerebral/firebase/factories'

export default [
  linkWithFacebook({
    redirect: state.useragent.media.small
  }),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

Similar you can sign in with Google or GitHub. Just use linkWithGoogle or linkWithGithub instead of linkWithFacebook.

off

action

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  // Turn off listener at specific path and
  // specific event
  firebase.off(path.posts, 'onChildChanged')

  // Turn off all listeners at specific path
  firebase.off(path.posts)

  // Turn off all listeners of specific event at wildcard path
  firebase.off(path.posts['*'], 'onChildChanged')

  // Turn off all listeners at wildcard path
  firebase.off(path.posts['*'])
}

factory

import { state, path } from 'cerebral/proxy'
import { off } from '@cerebral/firebase/factories'

export default [
  // Same API as in actions, also wildcard
  off(path.posts, 'onChildChanged'),

  // Compose using path proxy
  off(path.posts[state.selectedPostKey])
]

onChildAdded

action

import { sequences } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.onChildAdded('posts',  sequences.posts.onPostAdded, {
    // Merged with the payload passed on new data
    payload: {},
    // Read Firebase docs for these options
    endAt: 5,
    equalTo: 5,
    limitToFirst: 5,
    limitToLast: 5,
    orderByChild: 'count',
    orderByKey: true,
    orderByValue: true,
    startAt: 5
  })
  // posts.onPostAdded called with { key, value, ...payload }
}

This will immediately grab and trigger the sequence posts.onPostAdded for every post grabbed. Note this is just registering a listener, not returning a value from the action. The sequence is triggered with the payload: { key: 'someKey', value: {} }.

To stop listening for updates to the posts:

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.off(path.posts, 'onChildAdded')
}

factory

import { state, path, sequences } from 'cerebral/proxy'
import { onChildAdded } from '@cerebral/firebase/factories'

export default [
  onChildAdded(path.foo.bar, sequences.some.signal, {
    orderByChild: 'count',
    limitToFirst: state.config.limitToFirst
  })
]

onChildChanged

action

import { path, sequences } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.onChildChanged(path.posts, sequences.posts.postChanged, {
    // Same options as above
  })
  // posts.postChanged called with { key, value, ...payload }
}

This will trigger the sequence posts.postChanged whenever a post is changed in the selection. The sequence is triggered with the payload: { key: 'someKey', value: {} }.

To stop listening:

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.off(path.posts, 'onChildChanged')
}

factory

import { onChildChanged } from '@cerebral/firebase/factories'
import { path, sequences } from 'cerebral/tags'

export default [
  onChildChanged(path.foo.bar, sequences.some.signal, {
    // Same options as above
  })
]

onChildRemoved

action

import { path, sequences } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.onChildRemoved(path.posts, sequences.posts.postRemoved, {
    // Same options as above
  })
  // posts.postRemoved called with { key, ...payload }
}

This will trigger the sequence posts.postRemoved whenever a post is removed from the selection. The sequence is triggered with the payload: { key: 'someKey' }.

To stop listening:

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.off(path.posts, 'onChildRemoved')
}

factory

import { onChildRemoved } from '@cerebral/firebase/factories'
import { path, sequences } from 'cerebral/proxy'

export default [
  onChildRemoved(path.foo.bar, sequences.some.signal, {
    // Same options as above
  })
]

onValue

action

import { path, sequences } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.onValue(path.someKey.foo, sequences.someModule.fooUpdated, {
    payload: {} // Merged with the payload passed on new data
  })
  // someModule.fooUpdate called with { value, ...payload }
}

This will NOT immediately grab the value and trigger the signal passed, the first event is discarded for more predictable behaviour. To grab existing value, just use value.

To stop listening for updates to the value:

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  firebase.off(path.someKey.foo, 'onValue')
}

factory

import { onValue } from '@cerebral/firebase/factories'
import { path, sequences } from 'cerebral/proxy'

export default onValue(path.foo.bar, sequences.some.signal)

push

Generates a new child location using a unique key and returns its reference from the action. An example being {key: "-KWKImT_t3SLmkJ4s3-w"}.

action

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  return firebase
    .push(path.users, {
      name: 'Bob'
    })
    .then((response) => {
      /*
        {
          key: 'someKey'
        }
      */
    })
}

factory

import { path, state } from 'cerebral/proxy'
import { push } from '@cerebral/firebase/factories'

export default [
  push(path.users, state.newUser)
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { path, state } from 'cerebral/proxy'
import { push } from '@cerebral/firebase/factories'

export default [
  push(path.users, state.newUser),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

output

{
  key: 'theAddedKey'
}

put

Upload a new file at the given location. Please note that the file is not stored inside the realtime database but into Google Cloud Storage (please consult filrebase documentation). This means that you need to take care of storage security as well.

Note that put expects a folder as first argument and will use the name of the provided file. If you want to control the filename, add this in the options. In this case, make sure to respect file type and extension...

action

import { path } from 'cerebral/proxy'

function someAction({ firebase, props }) {
  return firebase.put(path.folderName, props.file, {
    progress({progress, bytesTransferred, totalBytes, state}) {
      /* do whatever */
    },
    // Override name, make sure you set same extension
    filename: 'customName.png'
    // optional payload added to progress callback
    { type: 'avatar'
    }
  })
    .then((response) => {
      /*
        {
          url: 'urlToFile',
          filename: 'nameOfFile'
          ... payload
        }
      */
    })
}

factory

import { props, sequences, path, state } from 'cerebral/proxy'
import {put} from '@cerebral/firebase/factories'

// we expect props.file to contain a file provided by
// a user in an <input type='file' />
export default [
  put(path.posts.all[props.postId], props.file, {
    // Trigger a signal which receives payload
    progress: sequences.gallery.progress
    // Set progress on a state value
    progress: state.gallery.progress
  }),
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { props, sequences, path, state } from 'cerebral/proxy'
import {put} from '@cerebral/firebase/factories'

// we expect props.file to contain a file provided by
// a user in an <input type='file' />
export default [
  put(path.posts.all[props.postId], props.file, {
    progress: sequences.gallery.progress,
    progress: state.gallery.progress
  }), {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

remove

Remove the data at this database location.

action

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  return firebase.remove(path.foo.bar).then(() => {
    // No output
  })
}

factory

import { props, path } from 'cerebral/proxy'
import { remove } from '@cerebral/firebase/factories'

export default [
  remove(path.users[props.userKey])
  // No output
]

factory with paths

import { props, path } from 'cerebral/proxy'
import { remove } from '@cerebral/firebase/factories'

export default [
  remove(path.users[props.userKey]),
  {
    success: [
      // No output
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

sendPasswordResetEmail

action

import { state } from 'cerebral/proxy'

function someAction({ firebase, get }) {
  return firebase.sendPasswordResetEmail(get(state.user.email)).then(() => {
    // No output
  })
}

factory

import { state } from 'cerebral/proxy'
import { sendPasswordResetEmail } from '@cerebral/firebase/factories'

export default [
  sendPasswordResetEmail(state.user.email)
  // No output
]

factory with paths

import { state } from 'cerebral/proxy'
import { sendPasswordResetEmail } from '@cerebral/firebase/factories'

export default [
  sendPasswordResetEmail(state.user.email),
  {
    success: [
      // No output
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

set

Write data to this database location. This will overwrite any data at this location and all child locations. Passing null for the new value is equivalent to calling remove(); all data at this location or any child location will be deleted.

action

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  return firebase.set(path.foo.bar, 'baz').then(() => {
    // No output
  })
}

factory

import { path, props } from 'cerebral/proxy'
import { set } from '@cerebral/firebase/factories'

export default [
  set(path.foo.bar, props.foo)
  // No output
]

factory with paths

import { path, props } from 'cerebral/proxy'
import { set } from '@cerebral/firebase/factories'

export default [
  set(path.foo.bar, props.foo),
  {
    success: [
      // No output
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

setOnDisconnect

Sets a value when Firebase detects user has disconnected.

action

import { path, state } from 'cerebral/proxy'

function someAction({ firebase, state }) {
  firebase.setOnDisconnect(
    path.activeUsers[state.app.user.uid],
    'someValue'
  )
}

factory

import { path, state } from 'cerebral/proxy'
import { setOnDisconnect } from '@cerebral/firebase/factories'

export default [
  setOnDisconnect(path.activeUsers[state.app.user.uid], null)
]

signInAnonymously

This login will method will resolve to existing anonymous or create a new one for you.

action

function someAction({ firebase }) {
  return firebase.signInAnonymously().then((user) => {
    /*
        name: 'Bob',
        ...
      */
  })
}

factory

import { signInAnonymously } from '@cerebral/firebase/factories'

export default [
  signInAnonymously()
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { signInAnonymously } from '@cerebral/firebase/factories'

export default [
  signInAnonymously(),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

signInWithCustomToken

Sign in a custom token.

action

import { state } from 'cerebral/proxy'

function someAction({ firebase, get }) {
  return firebase.signInWithCustomToken(get(state.token))
}

factory

import { state, props } from 'cerebral/proxy'
import { signInWithCustomToken } from '@cerebral/firebase/factories'

export default [
  signInWithCustomToken(props.token),

  // Alternatively with explicit paths
  signInWithCustomToken(state.token),
  {
    success: [],
    error: []
  }
]

output

{
  user: {
  }
}

signInWithEmailAndPassword

Sign in a user with email and password.

action

import { state } from 'cerebral/proxy'

function someAction({ firebase, get }) {
  const email = get(state.register.email)
  const password = get(state.register.password)

  return firebase
    .signInWithEmailAndPassword(email, password)
    .then((response) => {
      /*
        name: 'Bob',
        ...
      */
    })
}

factory

import { props } from 'cerebral/proxy'
import { signInWithEmailAndPassword } from '@cerebral/firebase/factories'

export default [
  signInWithEmailAndPassword(props.email, props.password)
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { props } from 'cerebral/proxy'
import { signInWithEmailAndPassword } from '@cerebral/firebase/factories'

export default [
  signInWithEmailAndPassword(props.email, props.password),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

signInWith{PROVIDER}

Sign in a user with Facebook, Google or Github.

action

function someAction({ firebase, state }) {
  return firebase
    .signInWithFacebook({
      redirect: false, // Use popup or redirect. Redirect typically for mobile
      scopes: [] // Facebook scopes to access
    })
    .then((response) => {
      /*
        name: 'Bob',
        ...
      */
    })
}

factory

import { state } from 'cerebral/proxy'
import { signInWithFacebook } from '@cerebral/firebase/factories'

export default [
  signInWithFacebook({
    redirect: state.useragent.media.small
  })
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { state } from 'cerebral/proxy'
import { signInWithFacebook } from '@cerebral/firebase/factories'

export default [
  signInWithFacebook({
    redirect: state.useragent.media.small
  }),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

Similar you can sign in with Google or GitHub. Just use signInWithGoogle or signInWithGithub instead of signInWithFacebook.

signOut

Sign out user.

action

function someAction({ firebase }) {
  return firebase.signOut().then(() => {
    // No output
  })
}

factory

import { signOut } from '@cerebral/firebase/factories'

export default [
  signOut()
  // No output
]

factory with paths

import { signOut } from '@cerebral/firebase/factories'

export default [
  signOut(),
  {
    success: [
      // No output
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

task

If you are using the firebase-queue and need to create tasks, you can do that with:

action

import { state } from 'cerebral/proxy'

function someAction({ firebase, get }) {
  return firebase
    .task('create_post', {
      uid: get(state.app.user.uid),
      text: get(state.posts.newPostText)
    })
    .then(() => {
      // No output
    })
}

This will add a task at queue/tasks. There is no output from a resolved task, it just resolves when the action has been processed.

factory

import { state, props } from 'cerebral/proxy'
import { task } from '@cerebral/firebase/factories'

export default [
  task('some_task', {
    uid: state.user.uid,
    data: props.data
  }),
  // No output

  // Alternatively with explicit paths
  task('some_task', {
    uid: state.user.uid,
    data: props.data
  }),
  {
    success: [],
    error: []
  }
]

factory with paths

import { state, props } from 'cerebral/proxy'
import { task } from '@cerebral/firebase/factories'

export default [
  task('some_task', {
    uid: state.user.uid,
    data: props.data
  }),
  {
    success: [
      // No output
    ],
    error: [
      // No output
    ]
  }
]

transaction

Atomically modifies the data at the provided location.

Unlike a normal set(), which just overwrites the data regardless of its previous value, transaction() is used to modify the existing value to a new value, ensuring there are no conflicts with other clients writing to the same location at the same time.

To accomplish this, you pass transaction() an update function which is used to transform the current value into a new value. If another client writes to the location before your new value is successfully written, your update function will be called again with the new current value, and the write will be retried. This will happen repeatedly until your write succeeds without conflict or you abort the transaction by not returning a value from your update function.

action

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  function transactionFunction(currentData) {
    if (currentData === null) {
      return { foo: 'bar' }
    }

    return // Abort the transaction.
  }

  return firebase
    .transaction(path.some.transaction.path, transactionFunction)
    .then((result) => {
      if (result.committed) {
        return { result: result.value }
      } else {
        throw new Error('Transaction failed')
      }
    })
    .then((response) => {
      /*
          {
            committed: true,
            value: 'new value'
          }
        */
    })
}

This will add a task at queue/tasks. There is no output from a resolved task, it just resolves when the action has been processed.

factory

import { path } from 'cerebral/proxy'
import { transaction } from '@cerebral/firebase/factories'

function transactionFunction() {...}

export default [
  transaction(path.foo.bar, transactionFunction),
  /*
    PROPS: {
      response: {...}
    }
  */
]

factory with paths

import { transaction } from '@cerebral/firebase/factories'

function transactionFunction() {...}

export default [
  transaction('foo.bar', transactionFunction), {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      // No output
    ]
  }
]

Note: Modifying data with set() will cancel any pending transactions at that location, so extreme care should be taken if mixing set() and transaction() to update the same data.

Note: When using transactions with Security and Firebase Rules in place, be aware that a client needs .read access in addition to .write access in order to perform a transaction. This is because the client-side nature of transactions requires the client to read the data in order to transactionally update it.

update

As opposed to the set() method, update() can be use to selectively update only the referenced properties at the current location (instead of replacing all the child properties at the current location).

action

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  return firebase
    .update(path.some.path, {
      foo: 'bar',
      'items.item1.isAwesome': true
    })
    .then(() => {
      // No output
    })
}

factory

import { path, props } from 'cerebral/proxy'
import { update } from '@cerebral/firebase/factories'

export default [
  update(path.some.path, {
    'foo.bar': props.bar,
    'foo.baz': props.baz
  }),
  // No output

  // Alternatively with explicit paths
  update(path.some.path, {
    'foo.bar': props.bar,
    'foo.baz': props.baz
  }),
  {
    success: [],
    error: []
  }
]

factory with paths

import { path, props } from 'cerebral/proxy'
import { update } from '@cerebral/firebase/factories'

export default [
  update(path.some.path, {
    'foo.bar': props.bar,
    'foo.baz': props.baz
  }),
  {
    success: [
      // No output
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

value

action

import { path } from 'cerebral/proxy'

function someAction({ firebase }) {
  return firebase.value(path.someKey.foo).then((response) => {
    /*
      {
        key: 'foo',
        value: 'some value'
      }
    */
  })
}

factory

import { path } from 'cerebral/proxy'
import { value } from '@cerebral/firebase/factories'

export default [
  value(path.foo.bar),
  /*
    PROPS: {
      response: {...}
    }
  */
  // Alternatively with explicit paths
  value(path.foo.bar),
  {
    success: [],
    error: []
  }
]

factory with paths

import { path } from 'cerebral/proxy'
import { value } from '@cerebral/firebase/factories'

export default [
  value(path.foo.bar),
  {
    success: [
      /* PROPS: { response: {...} } */
    ],
    error: [
      /* PROPS: { error: {...} } */
    ]
  }
]

Keywords

FAQs

Package last updated on 22 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc