🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

overlap

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

overlap - npm Package Compare versions

Comparing version

to
2.0.0

.travis.yml

29

package.json
{
"name": "overlap",
"version": "1.5.0",
"version": "2.0.0",
"description": "Overlap two strings that contain new lines. Useful for ASCII drawings.",
"main": "index.js",
"main": "lib/index.js",
"directories": {
"test": "test"
"example": "node example"
},
"scripts": {
"test": "node test/test.js"
"test": "node example"
},
"repository": {
"type": "git",
"url": "https://github.com/IonicaBizau/overlap"
"url": "https://github.com/IonicaBizau/node-overlap"
},
"keywords": [
"ascii",
"node"
"node",
"overlap"
],
"author": "Ionică Bizău <bizauionica@gmail.com>",
"license": "MIT",
"license": "KINDLY",
"bugs": {
"url": "https://github.com/IonicaBizau/overlap/issues"
"url": "https://github.com/IonicaBizau/node-overlap/issues"
},
"homepage": "https://github.com/IonicaBizau/overlap",
"homepage": "https://github.com/IonicaBizau/node-overlap",
"dependencies": {
"ansi-parser": "1.4.0"
"ansi-parser": "3.0.0",
"couleurs": "5.0.0",
"cli-box": "5.0.0"
},
"devDependencies": {
"couleurs": "^2.0.0"
"couleurs": "^5.0.0"
},
"blah": {
"h_img": "http://i.imgur.com/iiLhdlD.png",
"ex_img": "http://i.imgur.com/TC5QXRt.png"
}
}

@@ -1,51 +0,62 @@

Overlap
=======
<!---------------------------------------------------------------------------->
<!-- STOP, LOOK & LISTEN! -->
<!-- ==================== -->
<!-- Do NOT edit this file directly since it's generated from a template -->
<!-- file, using https://github.com/IonicaBizau/node-blah -->
<!-- -->
<!-- If you found a typo in documentation, fix it in the source files -->
<!-- (`lib/*.js`) and make a pull request. -->
<!-- -->
<!-- If you have any other ideas, open an issue. -->
<!-- -->
<!-- Please consider reading the contribution steps (CONTRIBUTING.md). -->
<!-- * * * Thanks! * * * -->
<!---------------------------------------------------------------------------->
![overlap](http://i.imgur.com/iiLhdlD.png)
# overlap [![Donate now][donate-now]][paypal-donations]
Overlap two strings that contain new lines. Useful for ASCII drawings.
# Installation
![overlap](http://i.imgur.com/TC5QXRt.png)
## Installation
```sh
$ npm install overlap
$ npm i overlap
```
# Example
## Example
```js
// Dependencies
var Overlap = require("overlap")
, Couleurs = require("couleurs")()
, a =
Couleurs.bg("+--------------+\n", 142, 68, 173) +
Couleurs.bg("| |\n", 142, 100, 200) +
Couleurs.bg("| " + Couleurs.fg("Hello World", 255, 255, 0), 142, 68, 173) + " |\n" +
Couleurs.bg("| |\n", 142, 100, 250) +
Couleurs.bg("| |\n", 142, 68, 173) +
Couleurs.bg("| |\n", 142, 68, 173) +
Couleurs.bg("| " + Couleurs.fg("Hello World", 0, 255, 0), 142, 68, 173) + Couleurs.bg(" |\n", 142, 68, 173) +
Couleurs.bg("| |\n", 231, 76, 60) +
Couleurs.bg("+--------------+", 231, 76, 60)
, b =
Couleurs.bold("+-------+\n") +
Couleurs.bg("| |\n", 192, 57, 43) +
Couleurs.bg("| |\n", 230, 126, 34) +
Couleurs.italic("+-------+")
, Couleurs = require("couleurs")
, Box = require("cli-box")
;
// Create two boxes
var box1 = Box("20x10", Couleurs("Hello World", [142, 68, 173]))
, box2 = Box("30x5", Couleurs("Hello Mars!", "#c0392b"))
;
// Combine them
console.log(Overlap({
who: a
, with: b
who: box1
, with: box2
, where: {
x: 10
, y: 1
x: 17
, y: 2
}
}));
```
Result:
## Documentation
![Example](http://i.imgur.com/B9OaFHD.png)
# Documentation
## `Overlap(options)`
### `Overlap(options)`
Overlaps two strings.
### Params
#### Params
- **Object** `options`: An object containing the following fields:

@@ -58,20 +69,17 @@ - `who` (String): The first string.

### Return
#### Return
- **String** The result string.
# How to contribute
1. File an issue in the repository, using the bug tracker, describing the
contribution you'd like to make. This will help us to get you started on the
right foot.
2. Fork the project in your account and create a new branch:
`your-great-feature`.
3. Commit your changes in that branch.
4. Open a pull request, and reference the initial issue in the pull request
message.
## How to contribute
Have an idea? Found a bug? See [how to contribute][contributing].
## License
[KINDLY][license] © [Ionică Bizău][website]–The [LICENSE](/LICENSE) file contains
a copy of the license.
# Changelog
See the [releases page](https://github.com/IonicaBizau/overlap/releases).
## License
See the [LICENSE](./LICENSE) file.
[license]: http://ionicabizau.github.io/kindly-license/?author=Ionic%C4%83%20Biz%C4%83u%20%3Cbizauionica@gmail.com%3E&year=2015
[contributing]: /CONTRIBUTING.md
[website]: http://ionicabizau.net
[docs]: /DOCUMENTATION.md
[paypal-donations]: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MG98D7NPFZ3MG
[donate-now]: http://i.imgur.com/jioicaN.png

Sorry, the diff of this file is not supported yet