Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cli-pages

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli-pages

pagination for command line apps

  • 1.0.13
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

logo


About

cli-pages is used to easily create pages for your command line interfaces and apps in no time! It has all the features you possibly need!

logo

Installation

npm install cli-pages

Example Usage


Creation

const { Book } = require("cli-pages");

let pages = new Book([
    {
        title: "Welcome to my app!",
        content: "This app does a lot of stuff! It can help you build a rocket!",
        footer: "Hope you enjoy!"
    },
    {
        title: "This is Amazing!",
        content: "epic!",
        footer: "Hope you understood!"
    },
    {
        title: "Thank you!",
        content: "Thank you for using my app! I really appreciate it!",
        footer: "<3"
    }
]);
OR
let pages = new Book();

pages.addPage({
    title: "Welcome to my app!",
    content: "This app does a lot of stuff! It can help you build a rocket!",
    footer: "Hope you enjoy!"
});
...

Displaying the pages in the terminal

const { Book } = require("cli-pages");

let pages = new Book([
    {
        title: "Welcome to my app!",
        content: "This app does a lot of stuff! It can help you build a rocket!",
        footer: "Hope you enjoy!"
    },
    {
        title: "This is Amazing!",
        content: "epic!",
        footer: "Hope you understood!"
    },
    {
        title: "Thank you!",
        content: "Thank you for using my app! I really appreciate it!",
        footer: "<3"
    }
]);

pages.open(); // displays the pages in the terminal

setTimeout(function(){
   pages.close(); // ends the page session and stops displaying the code after 60 seconds.
}, 60000)
Examples on how to edit, remove pages, get number of pages, set custom configurations can be found here

🤝 Contribution

For contributing to this project, fork the repository here, make the changes and open a pull request! Pull requests will be reviewed before being merged.

🐛 Bugs

Found a bug? Having an issue with the package? Open a new issue here!

Keywords

FAQs

Package last updated on 11 Jul 2021

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

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