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

@tipser/tipser-sdk

v2.2.55

Published

``` npm install @tipser/tipser-sdk ```

Downloads

312

Readme

Adding to project

npm install @tipser/tipser-sdk

Usage

Importing

ES6 imports syntax:

import { TipserSDK } from '@tipser/tipser-sdk'; or import { TipserSDK } from '@tipser/tipser-sdk/bare';

CommonJS syntax:

const { TipserSDK } = require('@tipser/tipser-sdk'); or const { TipserSDK } = require('@tipser/tipser-sdk/bare);

Polyfills

Check our MIT file to check what polyfills are required sdk to work. If you prefer to handle polyfills in your project by yourself, and your target is IE11 please make sure that you include polyfills listed above, and import @tipser/tipser-sdk/bare bundle. Otherwise, you are most welcome to import @tipser/tipser-sdk bundle which already includes polyfills necessary to be run in IE11.

Basic usage

import {TipserSDK} from '@tipser/tipser-sdk';

//...
const tipserSdk = TipserSDK(posId, {
    modalUi: {
        hideSimilarProducts: true
    }
});

tipserSdk.openProductDialog('5ba2334a781baa0001ccdf33');
//...

Usage in Typescript project

tipser-sdk package includes Typescript type definitions, so when used in Typescript project, type checking will work out of the box as well as autocompletion features of IDEs. In case the configuration is stored in a variable, the TipserSdkConfig type may be used as a type of that variable.

import { TipserSDK, TipserSdkConfig } from '@tipser/tipser-sdk';

//...
const tipserSdkConfig: TipserSdkConfig = {
    modalUi: {
        hideSimilarProducts: true
    }
}

const tipserSdk = TipserSDK(posId, tipserSdkConfig);

tipserSdk.openProductDialog('5ba2334a781baa0001ccdf33');
//...

Runtime Logs in Dev Tools

Logger register himself on a top window global object. It communicates with all other logger instances inside of iframes.

To turn on logger, and it's all instances in other iframes, go to Dev Tools console, ensure that top window context is selected and run following command:

TipserLogger.on()

To turn off:

TipserLogger.off()

Documentation

https://developers.tipser.com/tipser-sdk-script

Architecture

https://docs.google.com/drawings/d/1S9LoosqgZtsQUlTncvxY75zQUckUFx3t0X0uH7F9hoo

Publishing new versions

  1. Run npm run create-release-pr -- $(cat ~/.git-private-token) (.git-private-token containes GH personal token. How to create it?)
  2. Merge the PR on GH
  3. Switch to production locally and run yarn release
  4. Merge production back to develop (to sync version number in package.json)

In a less common scenario when you need to update minor or major version instead of patch version, replace yarn release command with one of the following commands:

  • npm version minor && git push --follow-tags
  • npm version major && git push --follow-tags