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

@moonjot/moon-utils

v0.0.9

Published

Moon Jot utils to build some plugins

Downloads

20

Readme

Moon Utils

Moon Jot utils function to develop plugins

Description

{{START_NOTE}} and {{END_NOTE}} will define a note entity, encompassing everything that is placed inside. For a note to be created, there must be a pre-defined path within the {{START_NOTE}} and {{END_NOTE}}. To define this path, it can be inserted between {{PATH}} and {{END_PATH}}.

Example:

{{START_NOTE}}
{{PATH}}/Note/title.md{{END_PATH}}
The following text has been capture with Moon Jot : {{CONTENT}}
{{END_NOTE}}

{{CONTENT} is the content of the Moon Jot Launcher at the moment you save it.

For more options, check the concept right afterwards.

Concept

You can create a template in Obsidian that allows you to formulate your own note format, based on the data we have gathered with Moon Jot.

List of the data and anchor for template

Must have

Create a note

All that is embedded inside will be checked out as a note to be created.

{{START_NOTE}}{{END_NOTE}}

Add a path to your note

You must add a path to the {{START_NOTE}}; otherwise, your note will not be created.

{{PATH}}{{END_PATH}}

example:

{{PATH}}
{{IF TITLE}}/Notes/{{TITLE}}.md{{END_IF TITLE}}
{{IF SOURCE.TITLE}}/Notes/{{SOURCE. TITLE}}.md{{END_IF SOURCE.TITLE}}
/Notes/ideas.md
{{END_PATH}}

If you do that, it will check the first one. If it's not good, it will take the second one. If the second one isn't good either, it will take the last one. If the path is empty at the end, it will not create the note.

Condition

Is defined

You can insert content based on a condition. Currently, the condition only checks if something exists or does not exist.

{{IF ...}}Write something{{END_IF ...}}

// Example:
{{PATH}}
{{IF TITLE}}{{TITLE}}.md{{END_IF TITLE}}
{{END_PATH}}

You can also do some condition with equality

=== undefined

{{IF SOURCE.RANDOM === undefined}}content{{END_IF SOURCE.RANDOM}}

=== some text

{{IF SOURCE.TEXT === some text}}content{{END_IF SOURCE.TEXT}}

// content is empty make only twitter user
{{IF content === }}{{IF people.0.twitter.0}}<a href="{{people.0.twitter.0}}">{{people.0.name}}</a>{{END_IF people.0.name}}{{END_IF content}}

!== some text

{{IF SOURCE.TEXT !== some text}}content{{END_IF SOURCE.TEXT}}

.includes(something)

{{IF SOURCE.TEXT.includes(some t)}}content{{END_IF SOURCE.TEXT}}

.startsWith(something)

{{IF SOURCE.TEXT.startsWith(- [ ])}}content{{END_IF SOURCE.TEXT}}

Date

You can format the date as YYYY-MM-DD HH:mm:ss.

{{DATE}}YYYY-MM-DD{{END_DATE}}
{{DATE}}HH:mm{{END_DATE}}

// Example:
{{PATH}}/Journal/{{DATE}}YYYY-MM-DD{{END_DATE}}.md{{END_PATH}}

Property

There are many properties that you can use.

Basic for all devices

{{CONTENT}} // What you wrote in the text editor.
{{TITLE}}   // You add the title in the text editor on the first line with # Some title.

From the context

{{SOURCE.DESCRIPTION}} // The source description.

{{PEOPLE.0.NAME}} // The person captured names
{{PEOPLE.1.NAME}} // The person captured names

Develop on Moon

Check the doc here https://github.com/castroCrea/moon/blob/main/doc/Plugin_Development.md

Check also the tutorial video https://youtu.be/dvoalnWBwv4 📹

Installation

yarn

Build before publishing

yarn build

For dev mode run

yarn watch

Publishing

First remove current git origin

git remote remove origin

Add you repo origin and change also credential iin package.json

Then

yarn pub