New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

join-files

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

join-files

join File|Blob|string|Object into a single file, and restore it at any time

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

join-files

join File|Blob|string|Object into a single file, and restore it at any time

import { joinFiles , splitFiles , FileItem } from 'join-files'

const files: FileItem[] = []

files.push({
    name : 'some text',
    data : "123123",
})
files.push({
    name : 'some object data',
    data : {
        name : 'safa',
        age : 9999
    },
})
files.push(
    new File(['some string'] , 'some.txt')
)
console.log( files )

const result = await joinFiles(files)
console.log( result )

const _files = await splitFiles(result)
console.log( _files )

convert a File to imageFile , and restore it at any time

import { fileToImageFile , imageFileToFile } from 'join-files'

const file = new File(['some string'] , 'some.txt')
console.log(file)

const imageFile = await fileToImageFile(file)
console.log(imageFile)

const _file = await imageFileToFile(imageFile)
console.log(_file)

in js

<script type='module'>
    import { joinFiles , splitFiles } from 'https://www.unpkg.com/join-files@0.10.0/index.js'
    // ...
</script>

Keywords

Merge Files

FAQs

Package last updated on 03 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts