Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added a new method: pwn #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SiddharthShyniben
Copy link

Fixes my own issue #60; Read that for more info

if (typeof(angular) !== 'undefined') {
angular.module('brototype', []).factory('Bro', function() { return Bro; });
if (typeof (angular) !== 'undefined') {
angular.module('brototype', []).factory('Bro', function () { return Bro; });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

@@ -154,12 +154,24 @@
}
// the deepest key is set to either an empty object or the value provided
brobj[props[props.length - 1]] = value === undefined ? {} : value;
},
"pwn": function (path) {
const brobj = this.obj,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -154,12 +154,24 @@
}
// the deepest key is set to either an empty object or the value provided
brobj[props[props.length - 1]] = value === undefined ? {} : value;
},
"pwn": function (path) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

var method = this.iCanHaz(methodString);
return new Bromise(this.obj, method, arguments);
},
"makeItHappen": function(key, value) {
"makeItHappen": function (key, value) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

var method = this.iCanHaz(methodString);
return new Bromise(this.obj, method, arguments);
},

"braceYourself": function(methodString) {
"braceYourself": function (methodString) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

return this.obj !== void 0;
},

"doYouEven": function(key, callback, options) {
"doYouEven": function (key, callback, options) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

@@ -48,11 +48,11 @@
Bro.NOWAY = false;

Bro.brototype = Bro.prototype = {
"isThatEvenAThing": function() {
"isThatEvenAThing": function () {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

}
}
return context;
},

"hereComeTheErrors": function(callback) {
"hereComeTheErrors": function (callback) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

if (this.method instanceof Function) {
var returnValue = this.method.apply(this.object, this.args);
if (returnValue) {
(callback || function(){}).call(context || this.object, returnValue);
(callback || function () { }).call(context || this.object, returnValue);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long.

@@ -10,21 +10,21 @@
}

Bromise.brototype = Bromise.prototype = {
"butWhenIdo": function(callback, context) {
"butWhenIdo": function (callback, context) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixed double and single quotes.

@deltreey
Copy link
Contributor

  1. a lot of your committed code is unrelated to your changes
  2. you also don't have any tests.
  3. I don't really have a preference, but is pwn the best stylistic option here?
  4. Is it wise to mix in modern es6 stuff like you did with const?

@SiddharthShyniben
Copy link
Author

  1. That's just my IDE. I'll fix that when I have time
  2. I have. Didn't it get commited? I'll check later
  3. Just an idea
  4. I'm just used to es6.

I'll fix them when I can. A bit busy now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants