Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

activity-names

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

activity-names

Normalised fitness activity names

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Activity-names

Normalise rando activity names from various fitness apis.

Usage:

  const activityNames = require('activity-names')
  const rawName = getActivityNameFromSomeWhere()
  const normcoreName = activityNames(rawName)
  // ...now do some aggregations that prefer normalised names.
'Ride' => 'Cycling'
'Bike Riding' => 'Cycling'
'Biking' => 'Cycling'

Standardising on Google Fit names as they are the most comprehensive, except on the issue of "Biking", which is "Cycling".

More generally the normalisation is:

  • Sentence case (unless a brand name like CrossFit)
  • Slashy alt names, pick the first one. "Boxing / MMA" => "Boxing".
  • Remove redundant qualifying paranetheses
    • "Inline skating (rollerblading)" => "Inline skating"
  • Any of [/Other.* /, falsey, ] => 'Activity'.
  • Defer to the Google fit one if no strong reason not to.

Use https://github.com/samuelmr/google-fit-activity-types to convert from a google-fit numeric activity id to a activity name first.


A (╯°□°)╯︵TABLEFLIP side project.

FAQs

Package last updated on 23 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc