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

@betacode/wordbucket-js-sdk

v1.1.2

Published

This plugin is responsible for the connection between the database of Word Bucket and your website, which means it'll fill the website with the proper contents.

Downloads

6

Readme

Word Bucket Plugin

This plugin is responsible for the connection between the database of Word Bucket and your website, which means it'll fill the website with the proper contents.

Installation

Download and install the plugin:

npm install word-bucket-js-sdk

Setup

To use the Word Bucket Plugin simply open the html file which you want to fill with content and place the next line inside the tag:

<script src = "**Insert path to the plugin here**" ></script>

Next, after the tag is closed, type:

<script>
  wordBucket = new WordBucket(a, b, c)
  wordBucket.setLanguage(d);
</script>

To conclude the configuration, replace the arguments with the following string values:

  • a - access token provided after the login in the Word Bucket website
  • b - the id of the website registered in the Word Bucket website
  • c - (Optional Argument) url of the database. If left empty, the default will connect to Word Bucket database
  • d - General language code. This value will define in which language is the content displayed. If left empty, the default is the browser's language

Usage

Wherever you wish to show a specific content, place the following line:

<message lang="k" key="x" html="y" textLength="z" ></message>

Then change the values to the following string values:

  • k - (Optional Argument) language in which the content will be displayed. If left empty, default value is the code defined in the setLanguage() function
  • x - key of the specific content. It'll be used to obtain the content value of the database
  • y - (Optional Argument) defines if the content obtained from the database is to be displayed with html tags that were saved previously or simply the content value. The values range between the strings "true" or "false". If left empty, the default is "false"
  • z - (Optional Argument) defines the length of characters of "lorem ipsum" that is displayed in case of inexistent content. The values range between '0' and '998'. If left empty, the default is '0'

In case you wish to obtain a specific message and the usage of the tag "message" does not work, you can work around it by using the function

wordBucket.message(x, y, z, k);

with the parameters being the same as the ones in the tag "message".

Language Codes

  • English - "gb"
  • Portuguese - "pt"

License

This project is licensed under the MIT License.