@opennd/lib
TypeScript icon, indicating that this package has built-in type declarations

0.0.18 • Public • Published

@opennd/lib

Install

npm  i  @opennd/lib --save

API Docs

Example

import { excelCursorStream } from '@opennd/lib'
const model = mongoose.model('xxx', new Schema({
  name: String,
  age: Number
}))

router.get('/xxx', (req, res) => {
  const cursor = model.find().cursor()
  await excelCursorStream({
    res,
    req,
    cursor,
    merges: ['A1:B1'],
    headers: [
      [
        { title: '真是帅的表格标题' },
      ],
      [
        { title: '姓名', dataIndex: 'name', width: 20 },
        { title: '年龄', dataIndex: 'age', width: 10 },
      ],
    ],
  })
})

Readme

Keywords

none

Package Sidebar

Install

npm i @opennd/lib

Weekly Downloads

0

Version

0.0.18

License

none

Unpacked Size

3.27 MB

Total Files

155

Last publish

Collaborators

  • njr