This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"queryString": "param1=value11¶m1=value12¶m2=value2", | |
"postData": { | |
"contents": "{ \"key1\": \"value1\", \"key2\": \"value2\" }", | |
"type": "application/javascript", | |
"name": "postData", | |
"length": 38 | |
}, | |
"parameter": { | |
"param1": "value11", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"queryString": "param1=value11¶m1=value12¶m2=value2", | |
"parameter": { | |
"param1": "value11", | |
"param2": "value2" | |
}, | |
"contextPath": "", | |
"parameters": { | |
"param1": [ | |
"value11", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkType = function(type, val, name) { | |
if (typeof val !== type) { | |
return "" + name + " has to be a " + type; | |
} | |
}; | |
err = checkType("string", id, "module ID") || checkType("function", creator, "creator") || checkType("object", options, "option parameter"); | |
if (err) { | |
this.log.error("could not register module '" + id + "': " + err); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var codeGroups = []; | |
for (var i = 0, len = productCodes.length; i < len; i += groupSize) { | |
codeGroups.push(_.first(_.last(productCodes, len - i), groupSize)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var encodeBase64 = function (val) { | |
var b64array = "ABCDEFGHIJKLMNOP" + | |
"QRSTUVWXYZabcdef" + | |
"ghijklmnopqrstuv" + | |
"wxyz0123456789+/" + | |
"="; | |
var input = val; | |
var base64 = ""; | |
var hex = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('lodash'); | |
module.export = function () { | |
console.log(_.max([1,2,3])); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple, tiny, dumb module definitions for Browser JavaScript. | |
// | |
// What it does: | |
// | |
// * Tiny enough to include anywhere. Intended as a shim for delivering | |
// browser builds of your library to folks who don't want to use script loaders. | |
// * Exports modules to `__modules__`, a namespace on the global object. | |
// This is an improvement over typical browser code, which pollutes the | |
// global object. | |
// * Prettier and more robust than the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var __isAMD = !!(typeof define === 'function' && define.amd), | |
__isNode = (typeof exports === 'object'), | |
__isWeb = !__isNode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var javaScriptStr = JSON.stringify(obj) | |
.replace('\u2028', '\\u2028') | |
.replace('\u2029', '\\u2029'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sb.send('dom/watch', '.b-pump-title-panel', function (err, changes) { | |
// some stuff with el | |
}); | |
var changes = await sb.send('dom/watch', '.b-pump-title-panel'); |