diff --git a/README.md b/README.md index e672ec3c8..fae77fbe9 100644 --- a/README.md +++ b/README.md @@ -3950,7 +3950,7 @@ functions(new Foo()); // ['a', 'b']
[⬆ Back to top](#table-of-contents) -### functionName +### functionsIn Returns an array of function property names from own and inherited enumerable properties of object. @@ -5487,6 +5487,7 @@ const httpPost = (url, callback, data = null, err = console.error) => { + const newPost = { "userId": 1, "id": 1337, diff --git a/docs/index.html b/docs/index.html index 67408ca39..7217edc50 100644 --- a/docs/index.html +++ b/docs/index.html @@ -855,7 +855,7 @@ console.log< this.b = () => 2; } functions(new Foo()); // ['a', 'b'] -

functionName

Returns an array of function property names from own and inherited enumerable properties of object.

Use Object.keys(obj) and Object.get.PrototypeOf(obj) to iterate over the object's own and inherited properties, Array.filter() to keep only those that are functions. Use the spread operator (...) to combine all returned property names into one array.

const functionsIn = obj =>
+

functionsIn

Returns an array of function property names from own and inherited enumerable properties of object.

Use Object.keys(obj) and Object.get.PrototypeOf(obj) to iterate over the object's own and inherited properties, Array.filter() to keep only those that are functions. Use the spread operator (...) to combine all returned property names into one array.

const functionsIn = obj =>
   [...Object.keys(obj), ...Object.keys(Object.getPrototypeOf(obj))].filter(
     key => typeof obj[key] === 'function'
   );
@@ -1234,6 +1234,7 @@ Logs: {
 
 
 
+
 const newPost = {
   "userId": 1,
   "id": 1337,
diff --git a/snippets/httpPost.md b/snippets/httpPost.md
index 7334a93cf..786e44a8b 100644
--- a/snippets/httpPost.md
+++ b/snippets/httpPost.md
@@ -37,6 +37,7 @@ const httpPost = (url, callback, data = null, err = console.error) => {
 
 
 
+
 const newPost = {
   "userId": 1,
   "id": 1337,