1.1.0 • Published 8 years ago

personality-behaviors v1.1.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
8 years ago

Behaviors for Personality Insights

last-release npm-version npm-license Build Status codecov.io npm-downloads

Obtain behaviors from Personality Insights' profiles. Behaviors present in this component are based on scientific research.

Getting Started

  1. Require and instance personality-behaviors component

    const PersonalityBehaviors = require('personality-behaviors');
    const personalityBehaviors = new PersonalityBehaviors({ locale: 'es' });
  2. Get profile's behavior

    const profile = require('./resources/profile');
    const behaviors = personalityBehaviors.behaviors(profile);
  3. Render behaviors somewhere! Try rendering them as cards!

See the complete example code or try it live

More Features

There are more features available such as:

  • Including the component as a browser script. Component will be exported as the global variable PersonalityBehaviors.

  • Filtering behaviors by category, industry or both!

const financeBehaviors = personalityBehaviors.behaviors(profile, { category: ['finance'] });
const mediaBehaviors = personalityBehaviors.behaviors(profile, { industry: ['media'] });
  • Get category and industry listings
const industries = personalityBehaviors.industries();
const categories = personalityBehaviors.categories();
  • Formatting descriptions in html or markdown optionally!
const personalityBehaviors = new PersonalityBehaviors({ format:'html' });
const mediaBehaviors = personalityBehaviors.behaviors(profile, { industry: ['media'] });

API Methods

The available methods are the following ones:

  • constructor :: (Options) -> PersonalityBehaviors - Obtain an instance of PersonalityBehaviors.
  • behaviors :: (Profile, FilterOptions) -> [Behavior] - Calculate the list of behaviors that apply to the given Personality Insights Profile.
  • categories :: [Category] - List of categories available.
  • industries :: [Industry] - List of industries available.

Definitions: