0.1.1 • Published 4 months ago
nemassler-lib v0.1.1
nemassler-lib
A Node.js library of nemassler, built in Rust.
Usage
Install dependency
npm i nemassler-lib
Use in Node.js
Transform Netease Music .ncm
files into .mp3
format.
Transform single file
import { processFile } from "nemassler-lib"
/**
* function processFile(ncmDirectory, mp3Directory, fileName): string
*
* mp3 output folder will be generated automatically.
*/
const result: string = processFile("/xxx/ncm","/xxx/mp3", "test.ncm")
// output: 'Output file: /xxx/mp3/test.mp3'
Transform multiple files
import { ncm2mp3 } from "nemassler-lib"
/**
* function ncm2mp3(ncmDirectory, mp3Directory): string[]
*
* You need to create ncm folder yourself.
* mp3 output folder will be generated automatically.
*/
const result: string[] = ncm2mp3("/xxx/ncm","/xxx/mp3")
// output: ['Output file: /xxx/mp3/<name>.mp3']
Dev
pnpm i
cd native && cargo check
cd .. && pnpm run debug