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

tore.js

v1.0.6-fixed

Published

Tore is a wrapper of JavaScript that builds off of other npm packages(And JavaScript), making it really easy to use for web servers, discord bots, and more!

Downloads

4

Readme

(fixed a bug where the web server wouldnt work)

Say hello to Tore!

Tore is a packages that builds off of other packages(and makes them easier), making Tore really easy to use for web servers, discord bots, and more!

Table of Contents:

What is included? How do I start? Examples

What is included?

You get:

  • A Discord API (discord.js)
  • A user input system (prompts)
  • A way to make web servers (express)
  • A interface for fetching resources on websites (node-fetch)

And more to come in the near future!

How do I start?

Just add this to your code if you want to enable everything:

const tore = require('tore.js')

Or to add specific things (Think of it like Discord's API Intents):

const { /* ANY Module you would like to add here (eg., log, prompt) */ } = require('tore.js')

Examples

ALWAYS CHECK THE GITHUB for the most updated examples!!

Prompt

const { prompt, log } = require('tore.js')

  const response = await prompt({
    type: 'number',
    name: 'value',
    message: 'Enter a number',
    validate: value => value < 0 ? `Number is less than 0.` : true
  });

  log(response);

Logger

const { log } = require('tore.js')
log('it works!!!')

var x = 'with variables too!'
log(x)

Fetch

const { fetch, log } = require('tore.js')
fetch('https://github.com/')
    .then(res => res.text())
    .then(body => log(body));

Colors in terminal

const { log, colors } = require('tore.js')
log(colors.green('i should be green'))

log(colors.america('good old usa!!!'))

Web Server

const { startServer, addServerPage, console } = require('./index.js')

startServer(3000)

addServerPage('/', (req, res) => {
  res.send('Hello World')
})

Discord Bot

const { discord } = require('./index.js')
const client = discord()


client.on('ready', () => {
  console.log('ready')
})

client.on('message', msg => {
  console.log(msg.content)
})

client.login(token)

Go to the discord.js docs for documentation

Classes

Classes in Tore are really easy! Instead of doing this:

const test = class {
constructor () {
this.ping = 'pong'
}
}

console.log(test.ping)

You would do this, which would save alot of time, while doing the same action(s):

const { Class, log } = require('tore.js')
const test = Class;
test.ping = 'pong'

log(test.ping)

Note: OTHER MODULE EXAMPLES NOT INCLUDED HERE CAN BE EASILY FOUND IN THE OFFICIAL node.js docs

Why Tore is easy to learn

  1. It is based off of JavaScript, which pretty much easy to learn.
  2. There are alot of other sources of documentation for every single module.
  3. It's also adds features weekly!