open-index/open-npm huggingface dataset:
npm package: @taggun/pdfium
Description: Node.js/iojs/node-webkit native pdfium port
Author: Ion Lupascu
Latest version: 12.0.1

# @taggun/node-pdfium

#### Render PDF files in node. Much better support for fonts and less rendering issues than libraries like PDF.js in node.

**node-pdfium** is a fork, updated to support Node 12 LTS. It is used by [TAGGUN to scan receipts and invoices](https://www.taggun.io).

# node-pdfium-native
Native port of [PDFium](https://code.google.com/p/pdfium/) to [node.js](https://nodejs.org/), [iojs](https://iojs.org/en/index.html) and [Nw.js](http://nwjs.io/).
The main motivation of this project is to render/convert a `PDF` format direct into `EMF` format, to be able to print on windows printer by using native [printer module](https://github.com/tojocky/node-printer).

# Methods:
* `getSupportedOutputFormats()` - returns an array of all supported output formats: `['BPM', 'EMF', 'PNG', 'PPM']`. Note that `EMF` and `BMP` formats are supported only on windows.
* `render(options, [callback(err, pages)])` - render/convert a PDF data into one of output format from `getSupportedOutputFormats()`.
Parameters:
  * `option` (object, mandatory) may contains the following fields:
    * `data` (Buffer, mandatory) - PDF data buffer
    * `outputFormat` (String, mandatory) - output format name. one from `getSupportedOutputFormats()`
    * `scaleFactor` (Number, optional, default: 1.0) - scale factor of the output format.
  *  `callback(err, pages)` (function, optional) - callback function. `pages` is array of buffers. If callback is missing, then the `pages` will be returned from `render(options)`. In case of error, an exception will be thrown.

# License:
`BSD` - feel free to use and support.
npm package: @taglivros/tag-hooks
Description: A Collection of React Hooks created by [@taglivros](https://site.taglivros.com/)
Author: taglivrosti
Latest version: 2.0.1

# TAG Hooks
A Collection of React Hooks created by [@taglivros](https://site.taglivros.com/)

## useCountdown hook
this hook provides a simple countdown with hours, minutes and seconds

### Reference
#### Methods

| Method name                 | Arguments                                                             | Description                                                                                                                                          | Returns                                      |
| --------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| ```initializeCountdown()``` | hours_?: number; minutes_?: number; seconds_?: number  endTime?: date | Initializes the countdown with given values. You should use either ```endDate``` or ``` hours_ && minutes_ && seconds_ ``` in order to work properly | null                                         |
| ```startCountdown()```      | -                                                                     | Starts the countdown                                                                                                                                 | interval (to use with ```clearInterval()```) |
| ```setTimerError()```       | value: boolean                                                        | Changes the error state to given value                                                                                                               | null                                         |

#### Properties

| Property       | Description                    |
| -------------- | ------------------------------ |
| ```days```     | Current Countdown Days left    |
| ```hours```    | Current Countdown Hours left   |
| ```minutes```  | Current Countdown Minutes left |
| ```seconds```  | Current Countdown Seconds left |
| ```hasError``` | Indicates state of an error    |

### Usage

```javascript
import React, { useEffect } from 'react'
import { useCountdown } from '@taglivros/tag-hooks'

const App = () => {
  const {
    initializeCountdown,
    startCountdown,
    days,
    hours,
    minutes,
    seconds } = useCountdown()
  useEffect(() => {
    initializeCountdown({ endDate: new Date(2022, 5, 5, 5) })// insert here a valid date
    startCountdown()
  })

  return (
    <div>
      <h1>{days}</h1>
      <h1>{hours}</h1>
      <h1>{minutes}</h1>
      <h1>{seconds}</h1>
    </div>
  )
}
```
🚨 **Note:** You should wrap the component that uses ```useCountdown``` with ```<CountdownProvider>``` in an higher level due its useContext use:
```javascript
import React from 'react'
import { CountdownProvider } from '@taglivros/tag-hooks'

const AppWrapper = () => {
  return (
    <CountdownProvider>
      <App />
    </CountdownProvider>
  )
}
```