I hereby claim:
- I am anthonyserious on github.
- I am anthonyserious (https://keybase.io/anthonyserious) on keybase.
- I have a public key ASASuIUilOzQ08H0pyuegMhuOSjvIiGRVSbRYr2MncGRXgo
To claim this, I am signing this object:
function mbeanToObject (mbean) { | |
var obj = {}; | |
var a = mbean.split(":"); | |
obj.domain = a[0]; | |
obj.properties = []; | |
a[1].split(",").forEach(function(propPair) { | |
var pair = propPair.split("="); | |
obj.properties[pair[0]] = pair[1]; | |
}); | |
return obj; |
// Recursively strip out fields in objects and subobjects | |
function stripFields(schema, obj) { | |
var newObj = {}; | |
var schemaType = schema.constructor.name; | |
var objType = obj.constructor.name; | |
// If types match and this property is not an Object, return the value | |
if (schemaType !== "Object") { | |
if(schemaType === objType) { |
var Q = require("q"); | |
var arr = [1,2,3,4]; | |
arr.reduce(function(prev, item) { | |
return prev.then(function(p) { | |
console.log(item); | |
return Q.delay(0); | |
}); | |
}, Q.resolve(1)); |
"use strict"; | |
module.exports = function stagger(fn, ms) { | |
let queue = []; | |
let running = false; | |
let flush = () => { | |
if (queue.length === 0) { | |
running = false; | |
return; |
I hereby claim:
To claim this, I am signing this object: