mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Use consistent function declaration style
This commit is contained in:
parent
9f0c4eb098
commit
04d7f4f019
4 changed files with 12 additions and 4 deletions
|
@ -35,7 +35,7 @@ var domToBlocks = function (blocksDOM) {
|
||||||
* @param {Object} e `Blockly.events.create`
|
* @param {Object} e `Blockly.events.create`
|
||||||
* @return {Array.<Object>} List of blocks from this CREATE event.
|
* @return {Array.<Object>} List of blocks from this CREATE event.
|
||||||
*/
|
*/
|
||||||
module.exports = function (e) {
|
var adapter = function (e) {
|
||||||
// Validate input
|
// Validate input
|
||||||
if (typeof e !== 'object') return;
|
if (typeof e !== 'object') return;
|
||||||
if (typeof e.xml !== 'object') return;
|
if (typeof e.xml !== 'object') return;
|
||||||
|
@ -146,3 +146,5 @@ var domToBlock = function (blockDOM, blocks, isTopBlock, parent) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = adapter;
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
* @param {Array} contents Contents of the list, as an array.
|
* @param {Array} contents Contents of the list, as an array.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
module.exports = function List (name, contents) {
|
var List = function (name, contents) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.contents = contents;
|
this.contents = contents;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = List;
|
||||||
|
|
|
@ -27,7 +27,7 @@ var mutatorTagToObject = function (dom) {
|
||||||
* @param {(Object|string)} mutation Mutation XML string or DOM.
|
* @param {(Object|string)} mutation Mutation XML string or DOM.
|
||||||
* @return {Object} Object representing the mutation.
|
* @return {Object} Object representing the mutation.
|
||||||
*/
|
*/
|
||||||
module.exports = function (mutation) {
|
var mutationAdpater = function (mutation) {
|
||||||
var mutationParsed;
|
var mutationParsed;
|
||||||
// Check if the mutation is already parsed; if not, parse it.
|
// Check if the mutation is already parsed; if not, parse it.
|
||||||
if (typeof mutation === 'object') {
|
if (typeof mutation === 'object') {
|
||||||
|
@ -37,3 +37,5 @@ module.exports = function (mutation) {
|
||||||
}
|
}
|
||||||
return mutatorTagToObject(mutationParsed);
|
return mutatorTagToObject(mutationParsed);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = mutationAdpater;
|
||||||
|
|
|
@ -9,8 +9,10 @@
|
||||||
* @param {boolean} isCloud Whether the variable is stored in the cloud.
|
* @param {boolean} isCloud Whether the variable is stored in the cloud.
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
module.exports = function Variable (name, value, isCloud) {
|
var Variable = function (name, value, isCloud) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.value = value;
|
this.value = value;
|
||||||
this.isCloud = isCloud;
|
this.isCloud = isCloud;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = Variable;
|
||||||
|
|
Loading…
Reference in a new issue