Midwest Dev Chat

MidwestDevChat.com github.com/skidvis/Midwest-Dev-Chat

  • The newest 15 messages in the super-cool #javascript channel.

  • 01/12 11:35:06 Dolly: Who would do that? 0_o

  • 01/12 11:35:37 Immanuel: sec

  • 01/12 11:36:01 Immanuel:

    /* global window */
    
    import ponyfill from './ponyfill';

    var root;

    if (typeof self !== 'undefined') {
    root = self;
    } else if (typeof window !== 'undefined') {
    root = window;
    } else if (typeof global !== 'undefined') {
    root = global;
    } else if (typeof module !== 'undefined') {
    root = module;
    } else {
    root = Function('return this')();
    }

    var result = ponyfill(root);
    export default result;

  • 01/12 11:36:06 Immanuel: don't do this

  • 01/12 11:36:36 Dolly: aah...

  • 01/12 11:36:55 Dolly: you're saying a lot of UMD code is going to break

  • 01/12 11:37:15 Immanuel: UMD code inside of an es module.

  • 01/12 11:41:18 Immanuel: https://github.com/defunctzombie/package-browser-field-spec

  • 01/12 11:41:36 Immanuel: If you write your libs with this spec in mind, you will have no need for that kind of complexity.

  • 01/12 11:42:40 Immanuel: But meh, I still think we need to allow the use of `typeof module` and declaration + assignment for `module` and `exports` as long as its not the free global (which will be undefined).

  • 01/12 11:47:34 Kyleigh: has joined the channel

  • 01/13 21:36:53 Dillon: has joined the channel

  • 01/17 14:14:11 Immanuel: https://twitter.com/TheLarkInn/status/821446693937934337

  • 01/17 14:14:15 Immanuel: smirk

  • 01/17 14:14:28 Immanuel: fire hot home cookin ready to make the web great again

  • *Usernames have been changed to protect the innocent.

Check out all the cool channels!

Join the conversation!