DailyJS

BiMap, jQuery breakpoint

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

libraries jquery data node modules responsive

BiMap, jQuery breakpoint

Posted by Alex R. Young on .
Featured

libraries jquery data node modules responsive

BiMap, jQuery breakpoint

Posted by Alex R. Young on .

BiMap

BiMap (GitHub: alethes / bimap, License: MIT, npm: bimap) by James Daab is a bidirectional map implementation. This is a data structure that allows you to query for values by keys and keys by values:

bimap.push({  
  a: {
    b: 1,
    c: {
      d: 2
    }
  }
});
bimap.key('a.b'); // => 1  
bimap.val(2); // => "a.c.d"  

jQuery breakpoint

jQuery breakpoint (GitHub: joshbambrick / breakpoint, License: MIT) by Joshua Bambrick is a plugin for tracking page resizes, and is ideal for when you need JavaScript to trigger in a responsive design.

You can attach listeners with $.breakpoint.on, and an array is accepted so you can respond to different preset device sizes. There's also $.breakpoint.off for removing listeners, and $.breakpoint.changeBreakpoints for changing the globally recognised device sizes.