bjorn 7 years ago
parent
commit
77abec153e
1 changed files with 24 additions and 18 deletions
  1. 24 18
      api/init.lua

+ 24 - 18
api/init.lua

@@ -422,6 +422,22 @@ return {
     }
     }
   },
   },
   modules = {
   modules = {
+    {
+      name = "json",
+      tag = "library",
+      summary = "Encodes and decodes JSON.",
+      description = "The json module exposes functions for encoding and decoding JSON. You can use it by requiring the `json` module.",
+      key = "json",
+      functions = {},
+      objects = {},
+      enums = {},
+      external = true,
+      examples = {
+        {
+          code = "local json = require 'json'\nlocal data = { health = 10, position = { 1, 2, 3 } }\nlocal encoded = json.encode(data)\nprint(encoded)\nlocal decoded = json.decode(encoded)\nprint(decoded.health, unpack(decoded.position))"
+        }
+      }
+    },
     {
     {
       name = "lovr",
       name = "lovr",
       summary = "In the beginning, there was nothing.",
       summary = "In the beginning, there was nothing.",
@@ -2155,9 +2171,12 @@ return {
         {
         {
           name = "isDirectory",
           name = "isDirectory",
           summary = "Check whether a path is a directory.",
           summary = "Check whether a path is a directory.",
-          description = "Check if a path is a directory.",
+          description = "Check if a path exists and is a directory.",
           key = "lovr.filesystem.isDirectory",
           key = "lovr.filesystem.isDirectory",
           module = "lovr.filesystem",
           module = "lovr.filesystem",
+          related = {
+            "lovr.filesystem.isFile"
+          },
           variants = {
           variants = {
             {
             {
               arguments = {
               arguments = {
@@ -2180,9 +2199,12 @@ return {
         {
         {
           name = "isFile",
           name = "isFile",
           summary = "Check whether a path is a file.",
           summary = "Check whether a path is a file.",
-          description = "Check if a path is a file.",
+          description = "Check if a path exists and is a file.",
           key = "lovr.filesystem.isFile",
           key = "lovr.filesystem.isFile",
           module = "lovr.filesystem",
           module = "lovr.filesystem",
+          related = {
+            "lovr.filesystem.isDirectory"
+          },
           variants = {
           variants = {
             {
             {
               arguments = {
               arguments = {
@@ -6976,22 +6998,6 @@ return {
         }
         }
       }
       }
     },
     },
-    {
-      name = "json",
-      tag = "library",
-      summary = "Encodes and decodes JSON.",
-      description = "The json module exposes functions for encoding and decoding JSON. You can use it by requiring the `json` module.",
-      key = "json",
-      functions = {},
-      objects = {},
-      enums = {},
-      external = true,
-      examples = {
-        {
-          code = "local json = require 'json'\nlocal data = { health = 10, position = { 1, 2, 3 } }\nlocal encoded = json.encode(data)\nprint(encoded)\nlocal decoded = json.decode(encoded)\nprint(decoded.health, unpack(decoded.position))"
-        }
-      }
-    },
     {
     {
       name = "math",
       name = "math",
       tag = "modules",
       tag = "modules",