open-index/open-npm huggingface dataset:
npm package: @nuskin/ns-app-elements
Description: Application components using Polymer and/or Vue components for webcomponents-ui.
Author: Kody Crossman
Latest version: 4.1.1

# @nuskin/ns-app-elements

Application components using Polymer and/or Vue components for webcomponents-ui. 
For current and new Vue components, you should use `https://code.tls.nuskin.io/ns-am/ux/app-components` instead.


## Installing

Usng npm:

```bash
npm add @nuskin/ns-app-elements
```

Usng yarn:

```bash
yarn add @nuskin/ns-app-elements
```

## Example usage

```js

```

## Resources

- https://code.tls.nuskin.io/ns-am/nu-skin-aem/wm/ns-app-elements
- https://code.tls.nuskin.io/ns-am/ux/app-components

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @nuskin/ns-auth
Description: This should be a short paragraph describing what this module is for..
Author: Ian Harisay
Latest version: 3.27.0

# @nuskin/ns-auth

This should be a short paragraph describing what this module is for..

## Installing

```
yarn add @nuskin/ns-auth
```

## API

## Resources

- Changelog could go here

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @nuskin/ns-core-styles
Description: Shared styles and style modules
Latest version: 2.12.2

# core-styles

> Core Styles Library for import into a .scss file or Vue component where scss is being used.

Core Styles uses the latest [sass-lang](https://sass-lang.com/documentation) api. You can either import the main.scss file or just the parts you want.

## Build Setup

```bash
# install depedencies
$ yarn

# generate unminified CSS
$ yarn build

# generate minified css
$ yarn build-min
```

## File Structure
```
/src
    /dist
        main.css
        main.css.map
    /scss
        _buttons.scss
        _colorClasses.scss
        _colors.scss
        _commonAppStyles.scss
        _commonTransitionStyles.scss
        _forms.scss
        _global.mixins.scss
        _globalVariables.scss
        _gridStyles.scss
        _other.scss
        _typography.scss
        _typographyVariables.scss
        _vuetifyOverrides.scss
        main.scss
```

You have the option to import either the whole minified main.css or the main.scss if you want to get load the whole library. To include the main.scss, you can pull it into your .scss file like this:

```css
@use '~@nuskin/ns-core-styles/src/main';
```

### *Please note that as of today, Jan 10, 2020 node-sass does not support '@use' and will fail. Instead you will need to add 'sass' and 'sass-loader' as depedencies.*

Further documentation for core-styles can be found in [Nu Skin's Storybook](https://www.nuskin.com/static/design-components) under Style Docs/Core Styles. There documentation exists for:

* [Buttons](https://www.nuskin.com/static/design-components/?path=/story/style-docs-core-styles--buttons) and [notes of use](https://www.nuskin.com/static/design-components/?path=/info/style-docs-core-styles--buttons).
* [Colors](https://www.nuskin.com/static/design-components/?path=/story/style-docs-core-styles--colors) and [notes of use](https://www.nuskin.com/static/design-components/?path=/info/style-docs-core-styles--colors)
* [CSS Custom Properties (aka CSS Variables)](https://www.nuskin.com/static/design-components/?path=/story/style-docs-core-styles--css-variables) and [notes on use](https://www.nuskin.com/static/design-components/?path=/info/style-docs-core-styles--css-variables)
* [Global Mixins](https://www.nuskin.com/static/design-components/?path=/story/style-docs-core-styles--global-mixins) and [notes on use](https://www.nuskin.com/static/design-components/?path=/info/style-docs-core-styles--global-mixins)
* [Grid Layouts](https://www.nuskin.com/static/design-components/?path=/story/style-docs-core-styles--grid-layouts) and [notes on use](https://www.nuskin.com/static/design-components/?path=/info/style-docs-core-styles--grid-layouts)
* [Typography](https://www.nuskin.com/static/design-components/?path=/story/style-docs-core-styles--typography) and [notes on use](https://www.nuskin.com/static/design-components/?path=/info/style-docs-core-styles--typography)
npm package: @nuskin/ns-dumb-lib-a
Description: The description that will amaze and astound your audience when they read it
Author: Ian Harisay
Latest version: 2.1.0

# NPM Library Template

## This template is for creating NPM module libraries

### What this template does for you

- Provides a `.gitlab-ci.yml` to manage the CI/CD pipeline
- Runs your *Unit Tests* with every push to the remote
- Analyzes your code with linting rules
- Will eventually run a *SAST* check
- Pushes your code coverage analysis to SonarQube
- Ensures your code passes the SonarQube Quality Gate
- Utilizes *Semantic Release*, which means the pipeline will handle versioning
- Publishes your module to *npmjs*

----
### To use this template, follow these steps:

#### 1. Setting up your local environment for Node development

If you are not set up to develop Node modules, follow these instructions:
- [Mac](./docs/env-setup-mac.md)
- [Windows](./docs/env-setup-windows.md)

#### 2. Create a new project in Gitlab from this template

1. Under [Application Development](https://code.tls.nuskin.io/ns-am), go to the Group or Sub-group where you want to create your new project.
2. Click on *New project*.
3. Select *Create from template*
4. Select *Group*
5. You'll find **NPM Library Template**, then click on *Use template*
6. Finish creating your new project

#### 3. Adding rules to your new project repository

- NEED TO DO

#### 4. Clone your new project to your development environment

#### 5. Update your new project with your project specific settings and information

1. Replace the `README.md` with a proper readme that will be displayed on *npmjs*
2. Update your the following settings in your `package.json`
```JavaScript
{
  "name": "npm-library-template",
  "description": "The description that will amaze and astound your audience when they read it",
  "repository": {
    "type": "git",
    "url": "git@code.tls.nuskin.io:ns-am/templates/npm-library-template.git"
  },
  "author": "Ian Harisay <imharisa@nuskin.com>",
  "homepage": "https://code.tls.nuskin.io/ns-am/templates/npm-library-template/blob/master/README.md"
}
```
npm package: @nuskin/ns-dumb-lib-c
Description: An awesome little function that tests for a null value.
Author: Ian Harisay
Latest version: 1.0.3

# @nuskin/ns-dumb-lib-c

An awesome little function that tests for a null value.

## Installing

Usng npm:

```bash
npm add @nuskin/ns-dumb-lib-c
```

Usng yarn:

```bash
yarn add @nuskin/ns-dumb-lib-c
```

## Example usage

```js
const { isNull } =  require('@nuskin/ns-dumb-lib-c')

let notDefined
if(isNull(notDefined)){
    console.log("This is null")
}

if(isNull(null)){
    console.log("This is null")
}

if(!isNull({})){
    console.log("This is not null")
}
```

## Resources

- Changelog could go here

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @nuskin/ns-login-react-native
Description: Nu Skin Login Module for React Native
Author: Harika Rathnala
Latest version: 11.0.3-0

# Login Module

Nu Skin Login Module

## Installation

```sh
npm install ns-login-react-native
```

## Usage

```js
import NsLoginReactNative from "ns-login-react-native";

// ...

const result = await NsLoginReactNative.multiply(3, 7);
```

## Development workflow

Before attempting to install and run the example program, there are 2 authentication files that are required. It is recommended for developement to use the NuSkin Test environment (vs Dev) so you will require the following files:

`oktaConfigurationTest.ts` which needs to be added to the `example/src` directory.

`Configuration.ts` which needs to be added to the `src` directory.

Once the configuration files are in place, to get started with the project, run `yarn` in the root directory to install the required dependencies for each package:

```sh
yarn
```

> While it's possible to use [`npm`](https://github.com/npm/cli), the tooling is built around [`yarn`](https://classic.yarnpkg.com/), so you'll have an easier time if you use `yarn` for development.

While developing, you can run the [example app](/example/) to test your changes. Any changes you make in your library's JavaScript code will be reflected in the example app without a rebuild. If you change any native code, then you'll need to rebuild the example app.

To start the packager:

```sh
yarn example start
```

To run the example app on Android:

```sh
yarn example android
```

To run the example app on iOS:

```sh
yarn example ios
```

To run the example app on Web:

```sh
yarn example web
```

To sign in you will need an account in the Nu Skin Test environment. If you do not already have an account, you can sign up at the [Nu Skin test server](https://test.nuskin.com/)

Make sure your code passes TypeScript and ESLint. Run the following to verify:

```sh
yarn typescript
yarn lint
```

To fix formatting errors, run the following:

```sh
yarn lint --fix
```

Remember to add tests for your change if possible. Run the unit tests by:

```sh
yarn test
```

### Linting and tests

[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)

We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.

Our pre-commit hooks verify that the linter and tests pass when committing.

### Scripts

The `package.json` file contains various scripts for common tasks:

- `yarn bootstrap`: setup project by installing all dependencies and pods.
- `yarn typescript`: type-check files with TypeScript.
- `yarn lint`: lint files with ESLint.
- `yarn test`: run unit tests with Jest.
- `yarn example start`: start the Metro server for the example app.
- `yarn example android`: run the example app on Android.
- `yarn example ios`: run the example app on iOS.

## License

MIT
npm package: @nuskin/order-model
Description: Order Model and conversion utility functions based on cart object and SalesOrder
Author: Dan Arnold
Latest version: 3.1.3

# @nuskin/order-model

This module defines the order model for the web commerce platform. It consists of fields from
the commercetools cart object, as well as fields from the SAP SalesOrder object.
It also has functions to convert between this model and SAP SalesOrder objects.

## Installing

Using npm:

```bash
npm add @nuskin/order-model
```

Using yarn:

```bash
yarn add @nuskin/order-model
```

## Example usage

```js
const { order: { Order } } = require('@nuskin/order-model');

// Create a new Order object from scratch
const myOrder1 = new Order({...});
// Create a new Order object from a SalesOrderRequest
const myOrder2 = Order.fromSalesOrderRequest(mySalesOrderRequest);
// Create a new Order object from a SalesOrderResponse
const myOrder3 = Order.fromSalesOrderResponse(mySalesOrderResponse);
// Convert an order to a SalesOrderRequest
const mySalesOrderRequest = myOrder2.toSalesOrderRequest();
// Convert an order to a SalesOrderResponse
const mySalesOrderResponse = myOrder3.toSalesOrderResponse();
```

<br>

## Updating the Order Model

When adding or removing properties from the order model. Kindly also update the type definition, which you can find in `@types/index.d.ts`

<br>

## Resources

* Commercetools cart object: https://docs.commercetools.com/api/projects/carts
npm package: @nuskin/order-sdk
Description: The description that will amaze and astound your audience when they read it
Author: Nate Kranendonk
Latest version: 1.1.8

# @nuskin/order-sdk

This should be a short paragraph describing what this module is for.

## Installing

Usng npm:

```bash
npm add @nuskin/order-sdk
```

Usng yarn:

```bash
yarn add @nuskin/order-sdk
```

## Example usage

```js
import {OrderClient} from '@nuskin/order-sdk';
import {order} from '@nuskin/order-model';

const Order = order.Order;

const client = new OrderClient({
    locale: 'en_US',
    env: 'test',
    clientId: 'clientIdforyourapp',
    clientSecret: 'yourappsecret',
    eid: 'userseid',
    guestCheckout: false,
    isSignup: false
});

const ord = new Order({orderObj...})

const updatedOrder = await client.orderSimulate(ord);
const createdOrder = await client.orderCreate(ord);
const updatedOrderStatus = await client.pollOrderStatus(ord.externalId);
```

## Resources



## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @nuskin/product-components-vue
Description: NuSkin vue product components library
Latest version: 1.0.9

# @nuskin/product-components-vue

"Product domain vue components are organized here.",

## Installing

Usng npm:

```bash
npm add @nuskin/product-components-vue
```

Usng yarn:

```bash
yarn add @nuskin/product-components-vue
```

## Example usage

```js
import {ProductCard} = from '@nuskin/product-components-vue';

```

## Storybook
Use Node v14.21.2 to ensure successful use of `yarn sb` script.

## Local Development

In order to test changes of this library locally you can simply test your changes in storybook, and once storybook reflects the changes you want, you can create a new release version and install the new release version in the client application that is receiving the product-components-vue library. 

If you want to test your local product-components-vue changes in the local version of your client application that is recieving those changes before you build a release, follow these steps:

1. Inside product-components-vue working directory, make the changes you want to make, save the files, and run `yarn link`. This will create a local version of the product-components-vue package. 
2. Go to the client application working directory and remove the "@nuskin/product-components-vue" from the package.json. Remove node_modules and re-run `yarn install`. We need to do this first because the npm released package and the local package can get confused. 
3. Still inside your client app, run `yarn link @nuskin/product-components-vue`.
4. You should now be able to import any component from @nuskin/product-components-vue inside your client application, and it will be pulling from your local version that you linked earlier. 
5. You will need to restart your client app each time you change your local product-components-vue changes. 
6. Once your satisfied with your changes, you can run `yarn unlink` and re-introduce the released version in your client apps package.json (@nuskin/product-components-vue).

## Resources
- [Testing vue-cli-service](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-unit-jest)
- [Storybook Vue](https://storybook.js.org/tutorials/intro-to-storybook/vue/en/get-started/)
- [Sonar](https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/)

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @nuskin/product-lib
Description: Library to store/retrieve product information
Author: Mark Miles
Latest version: 2.6.0

# @nuskin/product-lib

## Installing

Usng npm:

```bash
npm add @nuskin/product-lib
```

Usng yarn:

```bash
yarn add @nuskin/product-lib
```

## Example usage

```js
const { productLib } = require("@nuskin/product-lib");

let productFromSku = productLib.getProduct({
  fromId: "01001054",
  env: "dev",
  market: "us",
  language: "en",
});
console.log(JSON.stringify(productFromSku));

let productFromSlug = productLib.getProduct({
  fromSlug: "tegreen",
  env: "dev",
  market: "us",
  language: "en",
});
console.log(JSON.stringify(productFromSlug));
```

## Resources

- Changelog could go here

## License

[MIT](https://opensource.org/licenses/MIT)

````
#### 7. Turning on your CI/CD pipeline

Once you are ready for your project to start running the CI/CD pipeline, you should rename the `gitlab-ci.yml`
to `.gitlab-ci.yml`.
```bash
git mv gitlab-ci.yml .gitlab-ci.yml
git commit -am"Chore: renaming gitlab-ci.yml to .gitlab-ci.yml so my pipeline runs"
git push
````

## TODO: Write documentation about Semantic Release (don't forget prereleases)

#### How to use Semantic Release in your pipeline

Link to another page or write up instructions on how Semantic Release works with the pipeline

[eslint commit-analyzer](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-eslint) rules.
npm package: @nuskin/service-token
Description: A library used to create NextGen Service Tokens
Author: Ian Harisay
Latest version: 2.0.1

# @nuskin/service-token

This library is used to create a new `NextGen Service Token`. The token created is a JSON Web Token (JWT).
For additional information about JSON Web Tokens, click [here](https://jwt.io/introduction).

> **Note:** This package was previously published under the `@nextgen` scope as `@nextgen/service-token`. It has now moved to the `@nuskin` scope. Please update your dependencies accordingly.

## Installing

Using yarn:

```bash
yarn add @nuskin/service-token
```

## Example usage

```js
const { decodeJWT, isTokenStale, getServiceToken } = require('@nuskin/service-token')

const clientId = 'myFakeId'
const clientSecret = 'myFakeSecret'
const tokenUrl = 'https://the-token-store.com/some-endpoint'
const scopes = [
    'internal:fake:read',
    'internal:fake:write'
]

try {
    // create a new token with desired scopes
    const token = await getServiceToken(clientId, clientSecret, tokenUrl, scopes)

    // check if the token is stale
    if(isTokenStale(token)){
        // the token is stale and I should do something here if it is stale.
    }

    // decode the token
    console.log(decodeJWT(token))

} catch (error){
    console.error(error)
}
```

## Resources
[SDK Documentation]() _not currently published_  

## License

[MIT](https://opensource.org/licenses/MIT)