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

activity-phraser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

activity-phraser

[Activity](http://activitystrea.ms/) -> human readable string

  • 0.0.0-dev.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

activity-phraser

Activity -> human readable string

var phrase = require('activity-phraser').phrase({
    actor: 'ben',
    verb: 'post',
    object: 'activity-phraser'
});
assert.equal(phrase, 'ben posted activity-phraser');  

more tests

API

  • require('activity-phraser').phrase(activity) - Phrase a whole activity
  • require('activity-phraser').actor(activity.actor) - Phrase just the actor
  • require('activity-phraser').verb(activity.verb) - Phrase just the verb
  • require('activity-phraser').object(activity.object) - Phrase just the object
    • require('activity-phraser').object[type](activity.object) - Phrase a partciular objectType. e.g. 'collection', 'message'

Example

example.js will phrase infinity activity-mocks for you and pipe to stdout.

Joe posted "Used Tesla Roadster"
Martin Smith posted "Why I love Activity Streams"
Martin Smith posted a Photo
urn:example:person:martin posted a link
Bob Doe posted the message "This is a comment post."
site 222 verb "My Collection"
acct:joe@example.org posted a link

FAQs

Package last updated on 02 Jul 2014

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