Giter VIP home page Giter VIP logo

Comments (5)

webpro avatar webpro commented on June 27, 2024

Thought this might come in handy. This what's currently in use of underscore (in /src dir):

$ grep -rhoe '_\.[^(]\+' . | sort | uniq
_.after
_.all
_.any
_.bind
_.clone
_.debounce
_.each
_.isArray
_.isEqual
_.isFunction
_.isNaN
_.isObject
_.isString
_.throttle
_.without

Btw, a custom Lo-Dash build might be an option.

from postal.js.

ifandelse avatar ifandelse commented on June 27, 2024

@webpro Thanks - you saved me a lot of trouble! :-) I've been considering a few different options going forward, since we're about to make another pass over the API and try to normalize some things between channel def and top level pub/sub calls. Among the options I'm pondering:

  • With regards to dependencies:
    • non underscore/lodash build using shims if it significantly reduces footprint.
    • custom underscore or lodash build containing only the pieces postal utilizes
    • leaving things as they are
  • With regards to modularity/build customizations
    • any shims/custom underscore/lodash builds would ideally be swappable (i.e. - why carry the extra weight of the shims if the project is already using underscore for other needs?)
    • separate some of the additional features on the SubscriptionDefinition prototype into an add-on, so that you could opt-in to the fluent calls like "withDebounce", etc. by including that add-on (or using a postal build that has it included already)
    • Whatever & however we decide to break things up - my intent is to always provide a simple "everything" build of postal, with the custom builds for more advanced/targeted situations.

Anyway - just thought I'd explain more of what I'm thinking along these lines. Sounds like you may have predicted some of that as well :)

from postal.js.

jbadeau avatar jbadeau commented on June 27, 2024

On a related topic, it seems that the native (ECMA-262 ), underscore and lo-dash forEach method behave different when dealing with arrays that contain elements that are undefined. IE8<= also behaves different than the other browsers.

from postal.js.

bitmage avatar bitmage commented on June 27, 2024

The new Lodash release gives you lots of options for trimming down the lib size. You might want to take a look at that:

http://kitcambridge.be/blog/custom-builds-in-lo-dash-2-dot-0/

from postal.js.

ifandelse avatar ifandelse commented on June 27, 2024

Closing this out. Lodash has replaced underscore since v0.9 (IIRC), and future work may explore custom builds of lodash or ES6 builds...

from postal.js.

Related Issues (20)

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.