Git Product home page Git Product logo

allong.es's People

Contributors

dmotz avatar joelhooks avatar joshuacc avatar kevinsawicki avatar raganwald avatar reinh avatar vilmibm avatar wizardwerdna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

allong.es's Issues

Working decorator utility fn for wrapping jQuery?

I would love an all-in-one decorator utility function that I can use to wrap jQuery with. I've attempted to write such a utility in my own project devinrhode2/extendFunction.js, but this doesn't successfully wrap jQuery. One guess I have is that jQuery.prototype.init itself has a prototype that I need to also copy over into the decorated function. I have accomplished my goals via a hack, but what I'm seeking is the holy grail all in one decorator utility, which I can use to decorate any javascript function or class (or hybrid function+object+class Frankenstein that is jQuery)

(ps I found this project by searching lodash for "decorator" https://github.com/lodash/lodash/search?q=decorator&type=Issues)

How do I use a function to determine which property to get with get/getWith

For instance:

var fruits = [
  { name: 'orange', colour: 'orange' },
  { name: 'banana', colour: 'yellow' }
];
get(fruits[0], function() {
  if (whatever) {return 'colour';}
});
// Results: 'orange' or undefined

Or am I thinking about this the wrong way? Where I should instead look at using filter/filterWith to achieve something similar?

I am asking because I seem to want to do the same thing with pluck/pluckWith (ie: pluck arbitrary properties).

wrong order of operations in Game example

on page 210 a game is initialized with the following:

this.size = size ? Math.floor(Math.random() * 8) + 8 : size;

however, if size is null it is trying to create Game with null size. Therefore, the code should read like this:

this.size = size ? size : Math.floor(Math.random() * 8) + 8;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.