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

@promptexecution/k0mmand3r

v0.1.0

Published

typescript/wasm interface for k0mmand3r slash parser

Downloads

4

Readme

we are writing a rust library using the winnow crate which will be a string parser for "/slash" commands the library will be called k0mmand3r pronouced "commander" f

the k0mmand3r library must be able to be packaged as BOTH

  1. wasm using wasmer/bindgen and also
  2. exposed to python using maturin/pyo3 (a rust framework)
  3. as a rust crate for other rust programs

the k0mmand3r library should expose a method called parse() additionally should feature complete test coverage.

the parse command will follow these rules: parse can receive commands or content or both

any string should first be trimmed for whitespace on the front and back. after trimming, if found the kommand must begin with a forward slash "/", any string which doesn't begin with a / is returned as "content" (it has no command)

if a kommand is found then parse proceeds to parse the grammar of the command here are the rules for parsing a kommand grammar:

zero or more parameters will be found --parameters are prefixed by a double dash "--" parameters are always alphanumeric if a parameter is followed by an = then it will have a value token so --parameter or --parameter=value can be returned the order of parameters is important and should be preserved in the structures a parameter with no value is called a "tag" a parameter with a value is a type "kvpair" values can be of four types: 1. string 2. number 3. boolean 4. @user (a user token begins with a literal "@" followed by a letter, followed by one or more alphanumeric or emoji characters 5. #channel (a channel token begins with a literal "#" followed by a letter, followed by one or more alphanumeric or emoji characters

these structures once parsed should be stored in an k0mmand3r result object

the principal goal is to develop the parser and test cases the first task is to produce a synthetic set of commands, one per line, in a file the second task is to develop a k0mmand object the third task is to develop the parser by incorproatig the winnow crate the fifth task is to develop a wasm bindgen interface and run the same tests the sixth task will be to successfully process the synthetic commands using python

good luck!