![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Simple and User-Friendly API for rule34 paheal.
Recommended for REST API, Bots, Sites
$ npm install paheal
// in async function
const paheal = require('paheal')
const API = new paheal
// Get a Random Doujin
await API.search().then(search => console.log(search.results))
// Get a indicated Doujin
await API.getMedia(1).then(media => console.log(media))
// Searching
await API.byAuthor('dev').then(search => console.log(search.results))
// Next Page
const search = await API.search('devil')
const nextPage = await search.next()
console.log(nextPage.results)
Returns the not full object of a post.
Param Type Description tags string Tags into Search Usage example:
// in async function const search = await paheal.search('devil') console.log(search.results)
Returns: Promise<Search model object>
Param Type Description id string/number ID of Media Post Usage example:
// in async function const media = await paheal.getMedia(1) console.log(media.href)
Returns: Promise<Media model object>
Returns the not full object of a post.
Param Type Description name string Find posts by some Author Usage example:
// in async function const search = await paheal.byAuthor('noname') console.log(search.results)
Returns: Promise<Search model object>
{
author: String,
tags: String[],
src: String,
href: String
}
searchResult {
results: Array<SearchResult>
lastPage: Number,
currentPage: Number
}
{
id: Number,
tags: String[],
href: String
}
In a Node.JS 15.x, reject use a strict mode. So, when Promise returns a reject, your app crashes.
So, my library is user-friendly, and i don't want crash your app, if some wrong. So, how you can catch a errors?
For Example:
// in async function
let search = await paheal.search('devil')
if (search.status) return console.error(search.message);
And, your app don't be crashes :)
MIT License
Copyright © Mikun Hatsune
FAQs
Simple and user-friendly Wrapper of Rule 34 Paheal
The npm package paheal receives a total of 0 weekly downloads. As such, paheal popularity was classified as not popular.
We found that paheal demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.