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

@ping-identity/p14c-js-sdk-core

v1.0.0-pre.2

Published

The library consists of multiple parts that are usable on its own and together: - helper class to work with fetch methods; - logger methods.

Downloads

354

Readme

Core Module of PingOne SDK for JavaScript

The library consists of multiple parts that are usable on its own and together:

  • helper class to work with fetch methods;
  • logger methods.

#NOTE: THIS REPOSITORY IS IN A TESTING MODE AND IS NOT READY FOR PRODUCTION !!!

Content

  1. Installation
  2. Http API Reference
  3. Logger API Reference

Installation

To install all parts as one @ping-identity/p14c-js-sdk-core you can run these commands in your project root folder:

# yarn
yarn install @ping-identity/p14c-js-sdk-core

or

# npm
npm install --save @ping-identity/p14c-js-sdk-core

Adding the --save parameters will update the package.json file with instructions on what should be installed, so you can simply call npm install without any parameters to recreate this folder later.

To install some specific part please run these commands in your project root folder:

# yarn
yarn install @ping-identity/pingone-js-sdk-fetch
yarn install @ping-identity/pingone-js-sdk-logger

or

# npm
npm install --save @ping-identity/pingone-js-sdk-fetch
npm install --save @ping-identity/pingone-js-sdk-logger

Http API Reference

General class to work with fetch methods based on cross-fetch universal WHATWG Fetch API for Node, Browsers and React Native.

const {Http} = require("@ping-identity/p14c-js-sdk-core");
const fetch = new Http();
const  response = await fetch.getJson("https://someUrl", {accessToken: "accessTokenValue"})

| Method | Description | | ------------- |------------- | | fetch (uri, request) | The basic rest method that is used in all methods below. Sets Bearer Authorization header if accessToken is present in request | | delete (uri, request) | Call the delete method on requested uri | | json (uri, request)| Execute defined request with Accept: "application/json" header | | getJson (uri, request) | Execute json (uri, request) with GET method | | post (uri, request) | Execute fetch (uri, request) with POST method | | postJson (uri, request) | Execute json (uri, request) with POST method| | patchJson (uri, request) | Execute json (uri, request) with PATCH method | | putJson (uri, request) | Execute json (uri, request) with PUT method | | put (uri, request) | Execute fetch (uri, request) with PUT method |

Logger API Reference

A flexible abstraction over using console log.

const {logger} = require("@ping-identity/p14c-js-sdk-core");
logger.info("Something has happened.");
logger.warn("Something bad has happened.");
logger.debug("Something has happened with such details.");
logger.error("Something really bad has happened.");