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

@brandandcelebrities/activities-themes

v2.2.5

Published

List of activities and themes

Downloads

55

Readme

B&C Form Fields

npm i -S @brandandcelebrities/activities-themes

Components

Jump to Release Notes

Activities

import { Activities } from '@brandandcelebrities/activities-themes';
const activities = new Activities();

Methods & Usage

All methods can be chained to reduce the dictionary. Once the dictionary is reduced enough, you can use: .get() to get the keys and translations, .one(id) to get the translation, .keys() to get all keys only, .getAsSelectValues() to get an array of pair { value, label } to use in Select component

activities.locale('fr-FR'); 	// => Filter activities translations by locale

activities.gender('male');		// => Filter activities translations by gender (male or female, default is male)

activities.fullPath();	// => Filter activities translations by full-path mode

activities.exclude(['bmx', 'canoeying']);	// => Exclude the ids from the dictionary

activities.excludeChildren('other'); 	// => Exclude all children of "other"

activities.onlyInclude(['bmx', 'canoeying']);	// => Only include the provided ids in dictionary

activities.onlyFinals(); 	// => Include only activities which do not have sub-activities

activities.notFinals(); 	// => Include only activities with sub-activities

activities.excludeStage(0);	// => Exclude all activities from stage provided (0 to 2 currently)

activities.onlyStage(0);	// => Only include activities from the provided stage

activities.activitiesOf('sports')	// => Only include sub-categories of provided category

activities.sort();	// => Sort translations alphabetically


/* --- Examples --- */
// Get all activities in locale 'fr-FR' and gender 'female', sorted alphabetically
activities.locale('fr-FR').gender('female').sort().get();

// Get only finals activities in locale 'fr-FR' and gender 'female', sorted
activities.locale('fr-FR').onlyFinals().gender('female').sort().get();

// Get sub-activities of activity 'sports' in locale 'en-GB' and gender 'male'
activities.locale('en-GB').activitiesOf('sports').gender('male').get();

// Get all activities on stage 2, but without some ids in 'fr-FR' and full-path, sorted
activities.locale('fr-FR').onlyStage(2).exclude(['greco_roman_wrestling', 'free_wrestling']).fullPath().sort().get();

// Get the translation of activity 'cost_guard' in 'fr-FR' and 'female'
activities.locale('fr-FR').gender('female').one('cost_guard');

Themes

import { Themes } from '@brandandcelebrities/activities-themes';
const themes = new Themes();

Methods & Usage

All methods can be chained to reduce the dictionary. Once the dictionary is reduced enough, you can use: .get() to get the keys and translations, .one(id) to get the translation, .keys() to get all keys only, .getAsSelectValues() to get an array of pair { value, label } to use in Select component

themes.locale('fr-FR'); 	// => Filter themes translations by locale

themes.exclude(['animals', 'mode_accessories']);	// => Exclude the ids from the dictionary

themes.onlyInclude(['animals', 'mode_accessories']);	// => Only include the provided ids in dictionary

themes.sort();	// => Sort translations alphabetically


/* --- Examples --- */
// Get all themes in locale 'fr-FR' sorted alphabetically
themes.locale('fr-FR').sort().get();

// Get all themes, without some ids, in 'fr-FR', sorted
themes.locale('fr-FR').exclude(['animals', 'mode_accessories']).sort().get();

// Get the translation of theme 'food_drinks' in 'en-GB'
themes.locale('en-GB').one('food_drinks');

Release Notes

  • [2019-09-17] 2.2.4
    • Add transaltions for unicorn
  • [2019-06-17] 2.2.3
    • Move activity 'politics' into the new special activity unicorn
  • [2019-06-04] 2.2.2
    • Adding new activities:
      • event_or_wedding_planner
      • reality_tv
      • marketing_and_communication
      • tech_and_ai
      • management
    • Move politics to root category
  • [2018-04-03] 2.1.6
    • Typo correction in EN activity (Football Player)
    • new Method excludeChildren to exclude children of provided id,
    • Adding new root category other containing politics and licence
  • [2018-02-21] 2.1.3
    • New method keys()
  • [2018-02-09] 2.0.0
    • Activities and Themes in fr-FR & en-GB