
overlap

Overlap two strings that contain new lines. Useful for ASCII drawings.

:cloud: Installation
$ npm i --save overlap
:clipboard: Example
var Overlap = require("overlap")
, Couleurs = require("couleurs")
, Box = require("cli-box")
;
var box1 = Box("20x10", Couleurs("Hello World", [142, 68, 173]))
, box2 = Box("30x5", Couleurs("Hello Mars!", "#c0392b"))
;
console.log(Overlap({
who: box1
, with: box2
, where: {
x: 17
, y: 2
}
}));
:memo: Documentation
Overlap(options)
Overlaps two strings.
Params
- Object
options
: An object containing the following fields:
who
(String): The first string.
with
(String): The second string.
where
(Object): The second string position:
x
(Number): The position on x
axis.
y
(Number): The position on y
axis.
Return
- String The result string.
:yum: How to contribute
Have an idea? Found a bug? See how to contribute.
:dizzy: Where is this library used?
If you are using this library in one of your projects, add it in this list. :sparkles:
:scroll: License
MIT © Ionică Bizău