1.0.0 • Published 2 years ago

lottie-converter v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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()