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

activity-mocks

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-mocks

Mock [JSON Activity Streams](http://tools.ietf.org/html/draft-snell-activitystreams-09) Objects you can use to develop other components.

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

Version published
Maintainers
1
Created
Source

activity-mocks

Mock JSON Activity Streams Objects you can use to develop other components.

Using

The source is intended to be run by node (not, e.g. cajon).

A UMD build is distributed in dist/, and can be generated with make dist.

Mocks

From jasnell/activitystreams.jsonld README.

  • strings - Has only string values for Activity properties
  • jsonld - The 'extended example' whose .object has its own jsonld context

From the Spec

Vendors

Livefyre

API

The main export is a tree of the different sets of mocks

var activityMocks = require('activity-mocks');
activityMocks.strings;
activityMocks.jsonld;
activityMocks.livefyre.userPostMessage;
activityMocks.livefyre.sitePostCollection;

You can create a new instance of a mock by name

var activityMocks = require('activity-mocks');
activityMocks.create('strings');
activityMocks.create('jsonld');
activityMocks.create('livefyre.userPostMessage');
activityMocks.create('livefyre.sitePostCollection');

You can get an array of all mocks

require('activity-mocks').toArray();

You can get a list of all names

var activityMocks = require('activity-mocks');
activityMocks.names
  .filter(function (name) {
    return name.indexOf('livefyre.') === 0;
  })
  .map(activityMocks.create);

make commands

  • make build - will npm install and bower install
  • make dist - will use r.js optimizer to compile the source, UMD wrap, and place that and source maps in dist/
  • make clean
  • make server - serve the repo over http
  • make deploy [env={*prod,uat,qa}] - Deploy to lfcdn, optionally specifying a bucket env

FAQs

Package last updated on 17 Jun 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