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

polite-lang

v1.0.0

Published

Be polite and code with words

Downloads

8

Readme

PoLite lang

Be more polite while you code with PoLite lang. PoLite lang is the polite superset of JavaScript.

Install

npm i -g polite-lang

Usage

Compile

politec main.po

Features

Just use your words

Want to declare a function?

please create function main with no arguments and the code
  /* Hello :) */
ok

Want to set a variable or a constant?

please set variable foo to 'foo'
please set constant bar to 'bar'

Want to call a function?

run function foo with no arguments.

Express yourself

As much as you want to uwu and owo in your JavaScript code, you just can't. PoLite lang changes that. (Note: Requires --uwu-safe flag and restricts variable naming)

uwu please create function main uwu with no arguments owo and the code
  /* Hello :) */
ok

Use complex data types

You can use objects.

please set variable object to a group of things (
  foo is 'bar', and
  bar is 'foo'
)
run function println with arguments foo from object.
/* prints 'bar' */

You can use arrays.

please set variable object to a list of things (
  'foo', and 'bar'
)

Loops, ifs, logic, and math

Run a loop.

create loop and check index is less than 10 and on every iteration do
  run function println with arguments index.
ok

Use an if.

if foo equals bar then do
  run function println with arguments "They are equal".
ok

Use standard JavaScript math and logic.

if math(foo == bar) then do
  run function println with arguments "They are equal".
ok

Use it like a normal language

Like all real languages, PoLite lang has some special and seemingly random rules to follow to make it feel more realistic. For example, you must use please when you're defining a variable or a function. PoLite lang also only uses characters you would find in a written text, such as , () . ".

...and LOTS more

If there's a missing feature, feel free to make a pull request.

Politefile

The Politefile is a way to configure the compilation of PoLite lang. You can add flags from the Politefile, as well as configure the compilation target.

To use one, follow this syntax:

[key]
value1, optionalValue2, optionalValue3, etc

[key2]
value1, optionalValue2, optionalValue3, etc