schema-bridgion
v0.1.0
Published
Schema Bridgion is a library that enables data conversion between different formats.
Downloads
4
Maintainers
Readme
Schema Bridgion
Introduction
Schema Bridgion is a library that enables data conversion between different formats. It supports conversion between JSON, XML, YAML, and TOML formats. The library provides a simple API that allows you to easily convert data from one format to another.
Installation
You can install Schema Bridgion using npm or yarn.
# Install using npm
npm install schema-bridgion
# Install using yarn
yarn add schema-bridgionUsage Example
Here's an example of using Schema Bridgion to convert JSON data to XML:
import { convert } from 'schema-bridgion'
const input = {
name: 'Alice',
age: 28,
email: '[email protected]'
}
const xml = convert(JSON.stringify(input), 'json', 'xml')
console.log(xml)API
convert(input: string, from: Format, to: Format): string
Converts input data from one format to another.
input: The data to be converted.from: The format of the input data, which can bejson,xml,yaml, ortoml.to: The format of the converted data, which can bejson,xml,yaml, ortoml.
Returns the converted data.
Contributions
If you'd like to contribute to Schema Bridgion, you can submit a pull request to help improve the library. You can find the repository on GitHub.
License
Schema Bridgion is licensed under the MIT License.
