npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@yunpengai/print-js

v1.6.1

Published

A tiny javascript library to help printing from the web.

Downloads

7

Readme

Print.js

内部二开功能

理论实现

  1. 复杂表头 开发中
  2. 合并单元格 开发中

单元格合并规则:

行合并:

注意:需要将被合并的单元格设置为 undefined

[
  {
    [key]: {
      span: 2,
      type:'colspan',
      data: '132123'
    }
  }
]

列合并:

[
  {
    [key]: {
      span: 3,
      type:'rowspan',
      data: ['123', '123123', '123123']
    }
  }
]

示例数据:

const someJSONdata = [
  {
    name: 'John Doe', email: ['[email protected]', '[email protected]'], test: {
      type: 'rowspan',
      span: 3,
      data: ['123', '123123', '123123', '123123123']
    }, phone: '111-111-1111',
  },
  {
    name: 'John Doe', email: '123123123', test: 123123123, phone: '111-111-1111'
  },
  {
    name: 'John Doe', email: '123123123', test: {
      span: 2,
      type: 'colspan',
      data: '123123123'
    },
  },
  {
    name: { 
      span: 2,
      type: 'colspan',
      data: '132123'
    },
    test: {
      type: 'rowspan',
      span: 4,
      data: ['123', '123123', '123123', '123123123']
    },
    phone: '111-111-1111',
  },
];

A tiny javascript library to help printing from the web.

For documentation and examples please visit: printjs.crabbly.com

Installation

You can download the latest version of Print.js from the GitHub releases or use the Print.js CDN available on the documentation page.

To install via npm:

npm install print-js --save

To install via yarn:

yarn add print-js

Import the library into your project:

import printJS from 'print-js'

Documentation

You can find documentation at printjs.crabbly.com.

Contributing to Print.js

devDependencies Status dependencies Status

Contributions to Print.js are greatly welcomed and encouraged.

Using issues

The issue tracker is the preferred channel for reporting bugs, requesting new features and submitting pull requests.

Keep in mind that we would like to keep this a lightweight library.

Please do not use the issues channel for support requests. For help with using Print.js, please ask questions on Stack Overflow and use the tag printjs.

Reporting bugs

Well structured, detailed bug reports are hugely valuable for the project.

  • Check the issue search to see if it has already been reported.
  • Isolate the problem to a simple test case.
  • Create a codepen, fiddle, codesandbox or similar online example replicating the issue.

Please provide any additional details associated with the bug.

Pull requests

Clear, concise pull requests are excellent at continuing the project's community driven growth.

Please make your commits in logical sections with clear commit messages.

Setting up a dev environment
npm install
npm run watch
Tests

The library is written following the Javascript Standard code style. When running tests, we will also test for any style issues or warnings.

Automated tests are written using the Jasmine framework and Karma runner.

To run the automated tests:

npm run test

To manually test the library features:

npm start

This will serve test\manual\test.html and open http://localhost:8080/test/manual in your default browser.

License

Print.js is available under the MIT license.