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

dotpic

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dotpic

Doc picture generator

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

dotpic

Build Status Code Climate Code Coverage npm Version JS Standard

Doc picture generator

Installation

$ npm install dotpic --save

Usage

'use strict'

const dotpic = require('dotpic')
const fs = require('fs')

// Write dot picture
let src = `
000011110000
000001100000
000001100000
000001100000
100001100001
111111111111
111111111111
100001100001
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000001100000
000011110000
`

let svg = dotpic(src, {
  colors: {
    '0': '#444',
    '1': '#FFF'
  }
})

fs.writeFile('my-svg.svg', svg)

Signature

dotpic(src, options) -> string

Params

NameTypeDescription
srcstringimage data
optionsObjectOptional settings
options.colorsObjectColor data
options.widthnumberImage width
options.heightnumberImage height
options.backgroundstringBackground color

License

This software is released under the MIT License.

Keywords

dot

FAQs

Package last updated on 31 Aug 2016

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