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

traitify-js-browser-client

v1.0.3

Published

Traitify.js

Downloads

13

Readme

Traitify.js

This package does not require jQuery, as it is a standalone encapsulated library. It does however require a browser with the ability to make cors requests (currently only supports ie8 and up, chrome, safari, and firefox).

Assessment id and public key required!

For instructions on obtaining an assessment id and a public key visit: https://developer.traitify.com

Using The Latest and Greatest(Edge)!

For directions on using the latest traitify js scroll to the bottom

Using Traitify JS UI:

Include the Traitify.js library:

<script src="https://cdn.traitify.com/lib/v1.js"></script>

The following javascript will initialize with the above html:

<script>
  Traitify.setPublicKey("8asdf8sda-f98as-df8ads-fadsf"); // Example Public Key
  Traitify.setHost("api-sandbox.traitify.com"); // Example host url (Defaults to api.traitify.com)
  Traitify.setVersion("v1"); // Example Version
  var assessmentId = "34aeraw23-3a43a32-234a34as42"; // Example Assessment id
</script>

===============

Using Traitify JS API CLIENT:

<script src="https://cdn.traitify.com/lib/v1.js"></script>
Get Decks
Traitify.getDecks("assessment id").then(function(data){
  console.log(data)
})
Get Slides
Traitify.getSlides("assessment id").then(function(data){
  console.log(data)
})
Add Slide
Traitify.addSlide("assessment id").then(function(data){
  console.log(data)
})
Get Personality Traits
Traitify.getPersonalityTraits("assessment id").then(function(data){
  console.log(data)
})
Get Personality Types
Traitify.getPersonalityTypes("assessment id").then(function(data){
  console.log(data)
})
Get Personality Blend
Traitify.get("/assessments/+"assessmentId+"?data=blend&image_pack=linear").then(function(data){
  console.log(data)
})
Get Careers
Traitify.getCareers("assessment id", function(data){
  console.log(data)
})
Get Slides Using URL
Traitify.get("/assessments/"+assessmentId+"/slides").then(function(data){
  console.log(data)
})
Get Slides With JSON CamelCase
/* CamelCase instead of Underscore */
Traitify.setBeautify(true)
Traitify.getSlides(assessmentId).then(function(data){
  console.log(data)
})

Using Edge

Warning, things may break if you use edge, it is not stable, and is not intended to be. If you're looking for a stable deployment then use the v1 bundle from the above cdn.

<script src="https://cdn.traitify.com/lib/edge.js"></script>

Contributing

Building, Testing and Bundling:

$ cake watch
$ cake build
$ cake bundle
$ cake test