1.0.5 • Published 5 years ago

@sunshine_bit/capture v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

sunshine_bit@capture

截取指定 url 的屏幕信息,可以指定屏幕的宽和高.

安装

npm i @sunshine_bit/capture

参数

  • options object
    • url default: 'https://github.com/l4503071'(需要使用encodeURIComponent转义)
    • width default: 375,
    • height default: 667,
    • deviceScaleFactor default: 2,
    • fileName default: 'capture.png',
    • encoding default: 'binary',

TODO: 其他参数覆盖,参考 (./devices.js)

事例

const capture = require('@sunshine_bit/capture');
capture.capture({
  encoding: 'base64',
}).then((data)=>{
  console.log(data)
});
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago