SeaUrchinScore to Image for node
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
asset
.gitignore
LICENSE
LONG_LONG.sus
README.md
index.js
package.json
yarn.lock

README.md

sus-2-image

SeaUrchinScore to Image for node

npm sus:v2.17.0

Description

*.sus to Image.

Installation

$ yarn add sus-2-image

or

$ npm i sus-2-image

How to use

const Sus2Image = require('sus-2-image'),
  fs = require('fs')

const sus = fs.readFileSync('example.sus','utf8')

Sus2Image.getImages(sus)
  .then(images =>
    images.forEach((image,index) =>
      fs.writeFileSync(`data${index}.png` , new Buffer(image.split(',')[1], 'base64'))
    )
  )