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

@square-enix-west/membership-js-api

v0.8.2

Published

A library that allows developers to easily register and authenticate Square Enix membership users.

Readme

Membership JS API

Square Enix Membership is a service that provides authentication for users of Square Enix products. This library makes it easy to interact with.

#### Example usage

# First install in the project
yarn add @square-enix-west/membership-js-api
// Import from the project javascript
import Membership, { User } from '@square-enix-west/membership-js-api'

// Initialise the API
Membership.init({
  clientId: 'your-apps-id',
  service: 'membership' // (or "test-membership" if during development)
}).then(() => {
  if (User.isLoggedIn) {
    alert(`Hi, ${User.name}`)
  }
})

Full documentation can be found here
Examples can be found in the examples directory

Contributing

### Setting Up The Project

# Clone the repo
git clone [email protected]:squareenixoid/onlinedev-membership-js-api.git
cd onlinedev-membership-js-api

# Switch to the right Node version (v7)
# If using NVM
nvm install && nvm use

# Install dependencies
npm install

Working On The Code

Testing

Any changes/feature additions should use TDD. The project uses jest. Running npm run test will start watching the project and re-run tests on changes

Including In Local Projects During Development

To include a local membership-js-api in a project while working on it, you can use npm link

cd ~/Projects/onlinedev-membership-js-api
# Make the npm package available to link from other projects
npm link
# Watch and rebuild on any changes
npm run develop

# In another terminal
cd ~/Project/an-app-using-the-api
npm link @square-enix-west/membership-js-api

After invoking those commands, any javascript files requiring/importing @square-enix-west/membership-js-api should get the most up to date version, as it is in your local repo

Working On The Documentation

Running npm run docs:watch will start a watch task and a local server to view the docs. Go to http://localhost:4000 to view them. Any changes to the documentation should reflect instantly-ish

Releasing

The release process is fairly manual

Publishing To NPM

You can use the irish-pub npm package to perform a "dry run"

Deploying Updated Documentation

Pushing to master should result in the documentation being rebuilt and deployed to https://onlinedev-membership-js-api-prod.stage.sqexeu.com/quick-start-guide.html

Any problems speak to Malet. He'll probably sort you out.

Project goals

Provide a simple library for

✅ Registering Square Enix Membership accounts
✅ Logging a user in using a username and password
✅ Logging a user out

The API should

✅ Hide as much complexity as possible
✅ Provide consumable feedback on validation errors

The library should

✅ Have clear documentation
✅ Be easy to install and implement
✅ Should be worked on in isolation, and as such should
✅ Have a comprehensive test suite
✅ Should be consumable for modern application (use npm to import via private bitbucket repo)
✅ Should be consumable for legacy applications (provide a built version and publish to CDN for each revision)