Update json strings

This commit is contained in:
Sam El-Husseini 2017-08-28 21:52:09 -07:00
parent 124ad5c915
commit 48e081e584
4 changed files with 27 additions and 24 deletions

View File

@ -1,36 +1,36 @@
{ {
"Array": "Add, remove, and replace items in lists.\n\nAdd, remove, and replace items in lists.", "Array": "Add, remove, and replace items in lists.\n\nAdd, remove, and replace items in lists.",
"Array.filter": "Returns the elements of an array that meet the condition specified in a callback function.", "Array.filter": "Return the elements of an array that meet the condition specified in a callback function.",
"Array.filter|param|callbackfn": "A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array.", "Array.filter|param|callbackfn": "A function that accepts up to two arguments. The filter method calls the callbackfn function one time for each element in the array.",
"Array.get": "Gets the value at a particular index", "Array.get": "Get the value at a particular index",
"Array.get|param|index": "the zero-based position in the list of the item, eg: 0", "Array.get|param|index": "the zero-based position in the list of the item, eg: 0",
"Array.indexOf": "Returns the index of the first occurrence of a value in an array.", "Array.indexOf": "Return the index of the first occurrence of a value in an array.",
"Array.indexOf|param|fromIndex": "The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.", "Array.indexOf|param|fromIndex": "The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.",
"Array.indexOf|param|item": "The value to locate in the array.", "Array.indexOf|param|item": "The value to locate in the array.",
"Array.insertAt": "Insert the value at a particular index, increases length by 1", "Array.insertAt": "Insert the value at a particular index, increases length by 1",
"Array.insertAt|param|index": "the zero-based position in the list to insert the value, eg: 0", "Array.insertAt|param|index": "the zero-based position in the list to insert the value, eg: 0",
"Array.length": "Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.", "Array.length": "Get or set the length of an array. This number is one more than the index of the last element the array.",
"Array.map": "Calls a defined callback function on each element of an array, and returns an array that contains the results.", "Array.map": "Call a defined callback function on each element of an array, and return an array containing the results.",
"Array.map|param|callbackfn": "A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array.", "Array.map|param|callbackfn": "A function that accepts up to two arguments. The map method calls the callbackfn function one time for each element in the array.",
"Array.pop": "Removes the last element from an array and returns it.", "Array.pop": "Remove the last element from an array and return it.",
"Array.push": "Appends new elements to an array.", "Array.push": "Append a new element to an array.",
"Array.reduce": "Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.", "Array.reduce": "Call the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.",
"Array.reduce|param|callbackfn": "A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.", "Array.reduce|param|callbackfn": "A function that accepts up to three arguments. The reduce method calls the callbackfn function one time for each element in the array.",
"Array.reduce|param|initialValue": "Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.", "Array.reduce|param|initialValue": "Initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.",
"Array.removeAt": "Removes the object at position index.", "Array.removeAt": "Remove the element at a certain index.",
"Array.removeElement": "Removes the first occurence of an object. Returns true if removed.", "Array.removeElement": "Remove the first occurence of an object. Returns true if removed.",
"Array.reverse": "Reverses the elements in an Array. The first array element becomes the last, and the last array element becomes the first.", "Array.reverse": "Reverse the elements in an array. The first array element becomes the last, and the last array element becomes the first.",
"Array.set": "Stores the value at a particular index", "Array.set": "Store a value at a particular index",
"Array.set|param|index": "the zero-based position in the list to store the value, eg: 0", "Array.set|param|index": "the zero-based position in the list to store the value, eg: 0",
"Array.shift": "Removes the first element from an array and returns that element. This method changes the length of the array.", "Array.shift": "Remove the first element from an array and return it. This method changes the length of the array.",
"Array.slice": "Returns a section of an array.", "Array.slice": "Return a section of an array.",
"Array.slice|param|end": "The end of the specified portion of the array. eg: 0", "Array.slice|param|end": "The end of the specified portion of the array. eg: 0",
"Array.slice|param|start": "The beginning of the specified portion of the array. eg: 0", "Array.slice|param|start": "The beginning of the specified portion of the array. eg: 0",
"Array.sort": "Sorts the elements of an array in place and returns the array. The sort is not necessarily stable.", "Array.sort": "Sort the elements of an array in place and returns the array. The sort is not necessarily stable.",
"Array.splice": "Removes elements from an array.", "Array.splice": "Remove elements from an array.",
"Array.splice|param|deleteCount": "The number of elements to remove. eg: 0", "Array.splice|param|deleteCount": "The number of elements to remove. eg: 0",
"Array.splice|param|start": "The zero-based location in the array from which to start removing elements. eg: 0", "Array.splice|param|start": "The zero-based location in the array from which to start removing elements. eg: 0",
"Array.unshift": "Adds one element to the beginning of an array and returns the new length of the array.", "Array.unshift": "Add one element to the beginning of an array and return the new length of the array.",
"Math": "More complex operations with numbers.", "Math": "More complex operations with numbers.",
"Math.abs": "Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5.", "Math.abs": "Returns the absolute value of a number (the value without regard to whether it is positive or negative).\nFor example, the absolute value of -5 is the same as the absolute value of 5.",
"Math.abs|param|x": "A numeric expression for which the absolute value is needed.", "Math.abs|param|x": "A numeric expression for which the absolute value is needed.",
@ -92,22 +92,22 @@
"Math.trunc": "Returns the number with the decimal part truncated.", "Math.trunc": "Returns the number with the decimal part truncated.",
"Math.trunc|param|x": "A numeric expression.", "Math.trunc|param|x": "A numeric expression.",
"String": "Combine, split, and search text strings.\n\nCombine, split, and search text strings.", "String": "Combine, split, and search text strings.\n\nCombine, split, and search text strings.",
"String.charAt": "Returns the character at the specified index.", "String.charAt": "Return the character at the specified index.",
"String.charAt|param|index": "The zero-based index of the desired character.", "String.charAt|param|index": "The zero-based index of the desired character.",
"String.charCodeAt": "Returns the Unicode value of the character at the specified location.", "String.charCodeAt": "Return the Unicode value of the character at the specified location.",
"String.charCodeAt|param|index": "The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.", "String.charCodeAt|param|index": "The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.",
"String.compare": "Determines whether relative order of two strings (in ASCII encoding).", "String.compare": "See how the order of characters in two strings is different (in ASCII encoding).",
"String.compare|param|that": "String to compare to target string", "String.compare|param|that": "String to compare to target string",
"String.concat": "Returns a string that contains the concatenation of two or more strings.", "String.concat": "Returns a string that contains the concatenation of two or more strings.",
"String.concat|param|other": "The string to append to the end of the string.", "String.concat|param|other": "The string to append to the end of the string.",
"String.fromCharCode": "Make a string from the given ASCII character code.", "String.fromCharCode": "Make a string from the given ASCII character code.",
"String.isEmpty": "Returns a value indicating if the string is empty", "String.isEmpty": "Returns a value indicating if the string is empty",
"String.length": "Returns the length of a String object.", "String.length": "Returns the length of a String object.",
"String.substr": "Return substring of the current string.", "String.substr": "Return a substring of the current string.",
"String.substr|param|length": "number of characters to extract", "String.substr|param|length": "number of characters to extract",
"String.substr|param|start": "first character index; can be negative from counting from the end, eg:0", "String.substr|param|start": "first character index; can be negative from counting from the end, eg:0",
"control": "Program controls and events.", "control": "Program controls and events.",
"control.assert": "Display specified error code and stop the program.", "control.assert": "Display an error code and stop the program when the assertion is `false`.",
"control.deviceSerialNumber": "Derive a unique, consistent serial number of this device from internal data.", "control.deviceSerialNumber": "Derive a unique, consistent serial number of this device from internal data.",
"control.millis": "Gets the number of milliseconds elapsed since power on.", "control.millis": "Gets the number of milliseconds elapsed since power on.",
"control.onEvent": "Run code when a registered event happens.", "control.onEvent": "Run code when a registered event happens.",

View File

@ -10,7 +10,7 @@
"Array.unshift|block": "%list| insert %value| at beginning", "Array.unshift|block": "%list| insert %value| at beginning",
"Array|block": "Array", "Array|block": "Array",
"Math.constrain|block": "constrain %value|between %low|and %high", "Math.constrain|block": "constrain %value|between %low|and %high",
"Math.map|block": "map %value|from low %fromLow|from high %fromHigh|to low %toLow|to high %toHigh", "Math.map|block": "map %value|from %fromLow|%fromHigh|to %toLow|%toHigh",
"Math.randomRange|block": "pick random %min|to %limit", "Math.randomRange|block": "pick random %min|to %limit",
"Math|block": "Math", "Math|block": "Math",
"String.charAt|block": "char from %this=text|at %pos", "String.charAt|block": "char from %this=text|at %pos",
@ -19,6 +19,7 @@
"String.length|block": "length of %VALUE", "String.length|block": "length of %VALUE",
"String.substr|block": "substring of %this=text|from %start|of length %length", "String.substr|block": "substring of %this=text|from %start|of length %length",
"String|block": "String", "String|block": "String",
"control.assert|block": "assert %cond|with value %code",
"control.deviceSerialNumber|block": "device serial number", "control.deviceSerialNumber|block": "device serial number",
"control.millis|block": "millis (ms)", "control.millis|block": "millis (ms)",
"control.onEvent|block": "on event|from %src|with value %value", "control.onEvent|block": "on event|from %src|with value %value",

View File

@ -134,7 +134,8 @@ declare namespace control {
/** /**
* Derive a unique, consistent serial number of this device from internal data. * Derive a unique, consistent serial number of this device from internal data.
*/ */
//% blockId="control_device_serial_number" block="device serial number" weight=9 shim=control::deviceSerialNumber //% blockId="control_device_serial_number" block="device serial number" weight=9
//% help=control/device-serial-number shim=control::deviceSerialNumber
function deviceSerialNumber(): int32; function deviceSerialNumber(): int32;
} }
declare namespace serial { declare namespace serial {

View File

@ -7,6 +7,7 @@
"control.raiseEvent": "Announce that an event happened to registered handlers.", "control.raiseEvent": "Announce that an event happened to registered handlers.",
"control.raiseEvent|param|src": "ID of the Component that generated the event", "control.raiseEvent|param|src": "ID of the Component that generated the event",
"control.raiseEvent|param|value": "Component specific code indicating the cause of the event.", "control.raiseEvent|param|value": "Component specific code indicating the cause of the event.",
"input": "Respond to and read data from buttons and sensors.",
"input.Button": "Generic button class, for device buttons and sensors.", "input.Button": "Generic button class, for device buttons and sensors.",
"input.buttonDown": "Down button.", "input.buttonDown": "Down button.",
"input.buttonEnter": "Enter button.", "input.buttonEnter": "Enter button.",