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

fairytalescript

v0.3.2

Published

A programming language designed to look like a fairytale! No complicated symbols, just a beautiful story of adventure and friendship!

Downloads

3

Readme

FairyTale Script

A programming language designed to look like a fairytale! No complicated symbols, just a beautiful story of adventure and friendship!

Characters

There are no variables in FairyTale, just characters. First, you make a header like this: Characters Then, add your characters one by one with a dash:

- Adam
- James
- Lily

There's no way to assign a type to a character. To set a character, use became:
Adam became 5

There are no arrays, only friendships!
- 5 Dwarves - 19 Buddies

Dead or Alive

In a story, characters aren't "True" or "False". Logically, the FairyTale equivalent of a bool is dead or alive!
James became dead

Chapters

To make a funtion, you make a chapter! Just like this:
Chapter 1 - Hunble Beginnings The chapters need to have a number, and they have to be in the right order!

Chapter 1 will automatically start, but the others you gotta call yourself. Chapter 2 happened.

To make a variable inside a chapter, just introduce a new character: But then they met Cinderella!

A chapter needs to end in a satisfying way: Oh, what could happen next?

Dialogue

The magic compiling unicorn sadly can't speak. If you want to print something, a character has to speak: Mark said: "Hey guys! Let's explore that cave."

Loops

Fairytales typically have events that repeat. Just write how many times you want it to happen: This happened 10 times:

But what if you want something to happen an unspecified amount of times? Well, just use as long as and the loop will continue while all the conditions are true. This happend as long as Adam was "Hello" and Mike not was dead:

Want to run a loop for every character in

When Snow was "white"
For every Dwarf of Dwarves:
Dwarf became "happy"

If Statements

The question isn't if, it's when

When Romeo was dead, this happened:
Juliet became "sad".
Juliet became dead.

You want to write else? I only know of Otherwise.

When Hansel was "here", this happened:
Narrator said "Hansel for the win!".
Otherwise, when Gretel was "here", this happened:
Narrator said "Gretel is clearly the winner".
Otherwise, this happened:
Narrator said "Where'd they go? DID THEY DIE?".
Hansel became alive.
Gretel became alive.
Narrator said "Ah, there you are!".

To write or, type |[|]%¤ |} followed by TO_OR_STATEMENT.c]x| and then convert it to js++ using... Just kidding, it's or. And and.

Comments

The magic unicorn is afraid of brackets(Of course). Just put it inside brackets and it will be ignored: (Plot twist goes here)

Previous Books

You want to import an entire library? Whoa there, fella. How'd you plan on doing that? You gotta specify books separately! Read these books before you read this! Then, just add the books with a dash.

- How to Not Die 2
- A Tale of Swords and Blades
- Learning to control yourself: The Ultimate Guide

A Happy Ending

Like any story, your fairytale has to have an ending:
And they lived happily ever after!

Compiler

You need a magic program called node from the faraway land of nodejs.org.

The magic unicorn will translate your intriguing tale to javasc... Uhm, Unicorn language!

Simply install the compiler with npm i -g fairytalescript. The command is fairytale. You can use the flags -s and -o to specify source and output file respectively. If you want the compiler to read your book instantly, you add -r to the end of the command. The magic unicorn will take care of the rest!

Created by SpeedFrame and ThePicoNerd with help from the unicorn