break
case
catch
continue
debugger
default
delete
do
| module.exports = { | |
| "extends": ["eslint:recommended"], | |
| "env": { | |
| "browser": true, | |
| "es6": false, | |
| "node": true | |
| }, | |
| "globals": { | |
| "jQuery": true, | |
| "$": true, |
| .inner(...) { | |
| /* INNER */ | |
| } | |
| .inner(a) { | |
| /* type A */ | |
| .x-1 {float: left;} | |
| .x-2 {float: right;} | |
| } | |
| .inner(b) { | |
| /* type B */ |
| <?php | |
| /* C U S T O M F U N C T I O N S */ | |
| /** | |
| * search an array recursively to find | |
| * the first instance of a key and return its value | |
| * | |
| * useful when you do not know the location of a key nested (only once) in a multidimensional array | |
| * |
| metamorphosis = { | |
| defaults : { | |
| thing : 4 | |
| }, | |
| init : function (options) { | |
| var | |
| the = this, | |
| o, // private object | |
| p; // public object |
| phh = phh || {}; | |
| phh.round = function (n) { | |
| return ~~((n >= 0 ? n : -n) + 0.5); | |
| }; | |
| phh.ceil = function (n) { | |
| // faster than Math.ceil, but only behaves the same when testing positive numbers | |
| // http://jsperf.com/math-ceil/4 |
| // from google javascript style guide: | |
| // One thing to keep in mind, however, is that a closure keeps a pointer to its enclosing scope. As a | |
| // result, attaching a closure to a DOM element can create a circular reference and thus, a memory leak. | |
| // For example, in the following code: | |
| // Leaky example | |
| function foo (element, a, b) { | |
| element.onclick = function() { | |
| // uses a and b | |
| // this func keeps a pointer to foo, its enclosing scope |
| phh = phh || {}; | |
| (function ($) { | |
| $(function () { | |
| phh.url.init(); | |
| }); | |
| phh.url = (function () { | |
| // v 1.3 | |
| // runs before dom ready or window loaded |