Skip to content

Commit

Permalink
docs(content): updating nuxt content to reflect new function and version
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieSlome committed Dec 28, 2020
1 parent 5f1eb22 commit 41e76e9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/content/util.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
[
{
"name": [
"addObjectProperty"
],
"fileContents": "/**\n *\n * @name addObjectProperty\n *\n * @summary How do you add a key-value pair or new property to an object?\n *\n * @since 1.3.0\n *\n * @category Object\n *\n * @param {Object} x - Object to add new property to\n * @param {string} y - Property name\n * @param {any} z - Property value\n *\n * @return {Object} Provided object with new property added\n *\n * @example\n * => polyfig.addObjectProperty({}, \"poly\", [\"fig\"]);\n * => {\"poly\": [\"fig\"]}\n */\n\nfunction addObjectProperty(x, y, z) {\n return typeof x === \"object\" && x !== null && typeof y === \"string\"\n ? (x[y] = z)\n : new Error(\"x is not of type object or y is not of type string\");\n}\n\nmodule.exports = addObjectProperty;\n",
"code": "function addObjectProperty(x, y, z) {\n return typeof x === \"object\" && x !== null && typeof y === \"string\"\n ? (x[y] = z)\n : new Error(\"x is not of type object or y is not of type string\");\n}\n\nmodule.exports = addObjectProperty;\n",
"summary": [
"How do you add a key-value pair or new property to an object?"
],
"since": [
"1.3.0"
],
"category": [
"Object"
],
"params": [
"{Object} x - Object to add new property to",
"{string} y - Property name",
"{any} z - Property value"
],
"ret": [
"{Object} Provided object with new property added"
],
"example": [
"polyfig.addObjectProperty({}, \"poly\", [\"fig\"]);",
"{\"poly\": [\"fig\"]}"
]
},
{
"name": [
"capitalise"
Expand Down

0 comments on commit 41e76e9

Please sign in to comment.