New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ansi-art

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ansi-art - npm Package Compare versions

Comparing version 1.2.4 to 1.3.0

3

package.json
{
"name": "ansi-art",
"version": "1.2.4",
"version": "1.3.0",
"author": "gaurav chikhale",

@@ -35,3 +35,2 @@ "license": "MIT",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack -p",

@@ -38,0 +37,0 @@ "watch": "webpack --watch --progress",

@@ -1,2 +0,3 @@

#### ANSI ART
# ANSI ART
[![npm](https://img.shields.io/npm/v/ansi-art.svg?maxAge=000)](https://www.npmjs.com/package/ansi-art) [![npm](https://img.shields.io/npm/dm/ansi-art.svg?maxAge=000)](https://www.npmjs.com/package/ansi-art)

@@ -6,17 +7,15 @@

https://gauravchl.github.io/ansi-art/webapp/
<https://gauravchl.github.io/ansi-art/webapp/>
<img width="510" alt="screen shot 2017-04-25 at 11 51 53 am" src="https://cloud.githubusercontent.com/assets/3471415/25371301/b440ebe6-29ad-11e7-8459-abbea63e1630.png">
![screen shot 2017-04-25 at 11 51 53 am](https://cloud.githubusercontent.com/assets/3471415/25371301/b440ebe6-29ad-11e7-8459-abbea63e1630.png)
## Install
**Steps:**
1. Create and download the ANSI art from webapp: https://gauravchl.github.io/ansi-art/webapp/
2. Install `npm install ansi-art ` package to render the downloaded art file.
1. Create and download the ANSI art from webapp: <https://gauravchl.github.io/ansi-art/webapp/>
2. Install `npm install ansi-art` package to render the downloaded art file.
3. You can also render the pre-made art files in '/src/arts/'.
## Examples
**Examples:**
```
```js
// Using existing art

@@ -26,16 +25,12 @@ let ANSI = require('ansi-art').default;

console.log(mario);
```
```
```js
// Or use it with ES6 module
import ANSI from 'ansi-art';
let mario = ANSI.get({artName: 'mario'});
console.log(mario);
```
```
```js
// Using custom art file

@@ -47,3 +42,10 @@ import ANSI from 'ansi-art';

```js
// Using random art
import ANSI from 'ansi-art';
let art = ANSI.get({speechText: 'Hello world'})
console.log(art);
```
```js
// Using Speech bubble

@@ -53,27 +55,21 @@ import ANSI from 'ansi-art';

console.log(art);
```
**ANSI.get(options):**
### ANSI.get(options)
Parameter | Type | Description
------|------ | -------------
options.filePath | string | Path to custom ANSI art file(eg: ~/mario.ansi)
options.artName | string | Name of existing ANSI art available within package.[See available arts](https://github.com/gauravchl/ansi-art/blob/master/src/arts/)
options.speechText | string | If provided, render the text inside 'speech bubble' above the ANSI art
Parameter | Type | Description
--------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------
options.filePath | string | Path to custom ANSI art file(eg: ~/mario.ansi)
options.artName | string | Name of existing ANSI art available within package.[See available arts](https://github.com/gauravchl/ansi-art/blob/master/src/arts/)
options.speechText | string | If provided, render the text inside 'speech bubble' above the ANSI art
options.speechBubbleOptions | object | options for speech bubble, [See available options here](https://github.com/gauravchl/node-chat-bubble)
![screen shot 2017-05-14 at 4 57 37 pm](https://cloud.githubusercontent.com/assets/3471415/26033277/97663dc8-38c6-11e7-88d3-3d4534642ef4.png)
Mario credits: <https://github.com/acarl005/node-super-mario>
Parrot credits: <https://github.com/matheuss/parrotsay-api>
## Contributing
<img width="242" alt="screen shot 2017-05-14 at 4 57 37 pm" src="https://cloud.githubusercontent.com/assets/3471415/26033277/97663dc8-38c6-11e7-88d3-3d4534642ef4.png">
Mario credits: https://github.com/acarl005/node-super-mario
Parrot credits: https://github.com/matheuss/parrotsay-api
**Contributing**
Please feel free to submit any bugs or suggestions as issues or request to add any art into existing collections. Pull requests are welcome.

@@ -20,3 +20,4 @@ 'use-strict';

} else {
return 'artName or filePath required.';
const art = arts[Math.floor(Math.random() * arts.length)];
result = fs.readFileSync(art.path, 'utf8');
}

@@ -28,3 +29,2 @@

module.exports = { get, default: { get } };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc