How to use the console-browserify.error function in console-browserify

To help you get started, we’ve selected a few console-browserify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github danawoodman / starter / src / backend / customers / router.js View on Github external
this.update = function (customer, callback) {
    console.log('update customer:', customer);

    var err = Customer.update(customer);

    if (err) {
      console.error('There was an error!', err);
      callback(err, null);
      return;
    }

    callback(null, 'Success!');

    // Let other sockets know the customer was updated.
    socket.broadcast.emit('customer updated', customer);
  };
github danawoodman / starter / src / backend / customers / router.js View on Github external
this.create = function (customer, callback) {
    console.log('new customer:', customer);

    // TODO: Need to handle failures in saving.
    var cust = Customer.create({
      name: customer.name,
      email: customer.email
    });

    var err;
    if (err) {
      console.error('There was an error!', err);
      callback(err, null);
      return;
    }

    callback(null, cust);

    // Let other sockets know the customer was created.
    socket.broadcast.emit('customer created', cust);
  };
github danawoodman / starter / src / backend / customers / router.js View on Github external
this.destroy = function (id, callback) {
    console.log('delete customer:', id);

    var err = Customer.destroy(id);

    if (err) {
      console.error('There was an error!', err);
      callback(err, null);
      return;
    }

    callback(null, 'Success!');

    // Let other sockets know the customer was destroyed.
    socket.broadcast.emit('customer destroyed', id);
  };
github danawoodman / starter / src / frontend / customers / store.js View on Github external
function (err, message) {
        console.log('UPDATE!');
        if (err) {
          console.error(err);
          // TODO: Handle errors...
        }

        this.updateCustomer(customer);
      }.bind(this)
    );

console-browserify

Emulate console for all the browsers

MIT
Latest version published 5 years ago

Package Health Score

73 / 100
Full package analysis

Similar packages