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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nuskin/product-ratings-sdk

v1.1.0

Published

SDK for product ratings and reviews storefront experiences

Readme

@nuskin/product-ratings-sdk

TypeScript SDK for Nu Skin product ratings and reviews storefront experiences.

The SDK exposes Nu Skin product-ratings domain language and hides downstream network/vendor terminology behind typed mapping boundaries.

Translation Boundary

This package is the boundary between Nu Skin storefront applications and the downstream Equinox ratings and reviews API. Consumers should import and work with the public ProductReview* and ProductRatings* types exported from this package.

Equinox DTOs are internal implementation details. They are modeled in the SDK only so network responses and request bodies can be translated at the edge, and they are not exported from the package entrypoint.

Equinox* types must remain internal to this SDK. Do not export them, document them as consumer contracts, or require storefront applications to construct objects that match Equinox DTO shapes.

Examples of translations enforced by the SDK:

  • Equinox itemId is exposed as productId.
  • Equinox reviewtitle is exposed as reviewTitle.
  • Equinox ratingdistribution is exposed as ratingDistribution.
  • Equinox accumulatedtotal is exposed as accumulatedTotal.
  • Equinox ratingfinal is exposed as averageRating.
  • Equinox unlikeCount is exposed as dislikeCount.
  • Equinox collectionId is not exposed to consumers.

Storefront applications should not construct or depend on Equinox DTO shapes. If the downstream API changes, this SDK should absorb that change in its mapping layer while preserving the public product-ratings domain model whenever possible.

Install

yarn add @nuskin/product-ratings-sdk axios

axios is a peer dependency. The SDK creates and owns its internal Axios instance.

Usage

import { createRatingsReviewsService } from '@nuskin/product-ratings-sdk';

const ratingsReviews = createRatingsReviewsService({
  baseUrl: '/storefront/ratings-reviews',
  storeId: 'US',
  locale: 'en_US',
  userId: 'US1234567'
});

const summary = await ratingsReviews.getRatingsSummary({
  productId: 'sku-123'
});

const reviews = await ratingsReviews.getReviews({
  productId: 'sku-123',
  page: 1,
  size: 10,
  sort: 'mostRecent'
});

Build Outputs

The package is authored in TypeScript and publishes consumer-friendly build artifacts:

  • CommonJS JavaScript: dist/index.js
  • ES module JavaScript: dist/index.mjs
  • Source maps: dist/*.map
  • Type definitions: dist/index.d.ts

Scripts

yarn build
yarn types:check
yarn lint
yarn test