JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1602
  • Score
    100M100P100Q120364F
  • License MIT

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

Package Exports

  • overlap

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (overlap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

overlap

overlap

Patreon PayPal AMA Travis Version Downloads Get help on Codementor

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

overlap

☁️ Installation

$ npm i --save overlap

📋 Example

// Dependencies
var Overlap = require("overlap")
  , 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: box1
  , with: box2
  , where: {
        x: 17
      , y: 2
    }
}));

📝 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.

😋 How to contribute

Have an idea? Found a bug? See how to contribute.

💰 Donations

Another way to support the development of my open-source modules is to set up a recurring donation, via Patreon. 🚀

PayPal donations are appreciated too! Each dollar helps.

Thanks! ❤️

💫 Where is this library used?

If you are using this library in one of your projects, add it in this list. ✨

📜 License

MIT © Ionică Bizău