lottie-converter

1.0.0 • Public • Published

About The Package

This is an unoffical api for this website. It can convert any lottie(.json) file to other formats like gif, webp, etc.

To know more about it you can join my discord server here.

Uses

const converter = require('lottie-converter')
const fs = require('fs')

async function main() {
    let converted = await converter({
        file: await fs.readFileSync('lottie.json'),//file buffer
        filename: 'hi.json',//optional
        format: 'gif',// format to convert to, either 'gif' , 'mp4' , 'webp' , 'webm' or 'lottie'
        width: 100,//optional, defaults to 1000
        height: 100, //optinal, defaults to 1000
    })
    console.log(converted)//base64
    fs.writeFileSync('converted.gif', converted ,'base64')
}
main()

Package Sidebar

Install

npm i lottie-converter

Weekly Downloads

17

Version

1.0.0

License

ISC

Unpacked Size

2.66 kB

Total Files

3

Last publish

Collaborators

  • meiraba