-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlin-wrappers/kotlin-yaml)](https://mvnrepository.com/artifact/org.jetbrains.kotlin-wrappers/kotlin-yaml) | ||
|
||
# Module kotlin-yaml | ||
|
||
Kotlin wrapper for the [YAML](https://eemeli.org/yaml/) library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-library-conventions` | ||
} | ||
|
||
dependencies { | ||
jsMainApi(npm(libs.npm.yaml)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
description=Kotlin wrapper for YAML | ||
js.platform=web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package yaml | ||
|
||
@JsModule("yaml") | ||
external object YAML { | ||
/** | ||
* Parse an input string into JavaScript. | ||
* | ||
* Only supports input consisting of a single YAML document; for multi-document | ||
* support you should use `YAML.parseAllDocuments`. May throw on error, and may | ||
* log warnings using `console.warn`. | ||
* | ||
* @param str - A string with YAML formatting. | ||
* @param reviver - A reviver function, as in `JSON.parse()` | ||
* @returns The value will match the type of the root value of the parsed YAML | ||
* document, so Maps become objects, Sequences arrays, and scalars result in | ||
* nulls, booleans, numbers and strings. | ||
*/ | ||
fun <T> parse(src: String): T | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters