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

@friendlycaptcha/sdk

v0.1.14

Published

In-browser SDK for Friendly Captcha v2 (currently in preview only)

Downloads

3,896

Readme

Friendly Captcha SDK

NPM Version badge

The SDK that is used to integrate Friendly Captcha v2 into your website.

This is the code that runs on your website, inserting the captcha widget.

☝️ This is the SDK for Friendly Captcha v2 only. If you are looking for the v1 SDK, you can find that here.

Installation

# using npm
npm install @friendlycaptcha/sdk

# using yarn
yarn add @friendlycaptcha/sdk

You can then use it in your library.

import { FriendlyCaptchaSDK } from "@friendlycaptcha/sdk"

// Re-use this SDK if you are creating multiple widgets.
const sdk = new FriendlyCaptchaSDK();
// HTML element that you want to mount the widget under.
const mount = document.querySelector("#my-widget-mount");

// Create the widget
const widget = sdk.createWidget({
    element: mount,
    sitekey: "<your sitekey>"
});

Documentation

The documentation can be found in our Developer Hub, and the Getting Started guide.

Development

If you want to develop this SDK itself the following commands are useful

# install dependencies 
npm install

# minimal build
npm run build

# build for distribution (also builds docs)
npm run build:dist

# run the basic unit tests
npm run test

sdktest

We include more proper end-to-end tests in the sdktest tool folder.

Updating the docusaurus SDK reference docs

We automatically generate markdown docs and translate these into files that are in a format that works for Docusaurus. You will then need to update the docs manually by deleting the old files and adding the new ones. Something like this:

 rm -rf ../friendly-docs/docs/sdk/reference && mkdir ../friendly-docs/docs/sdk/reference && cp -r ./build/docs/docusaurus/ ../friendly-docs/docs/sdk/reference/

Adding license headers

# print those files that would be changed
npm run license-check-and-add -- check

# add the headers
npm run license-check-and-add -- add

License

This is free software; you can redistribute it and/or modify it under the terms of the Mozilla Public License Version 2.0.

Contributing

Contributions are welcome.

Prior to us being able to accept your contribution you will need to sign our CLA (Contributor License Agreement).