Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

This package has been deprecated

Author message:

please use hoodie-plugin-global-share

hoodie-plugin-public-share

1.0.0 • Public • Published

hoodie-plugin-public-share Build Status

Installation:

hoodie install public-share

Usage:

Assuming you have a running hoodie setup.

Create a few documents you'd like to make publicly available:

var docs = [
  {
    name: 'sleep'
  },
  {
    name: 'eat'
  },
  {
    name: 'sleep some more'
  }
];
 
hoodie.store.add('tasks', docs).done(function(newDocs) { /.../ });

Make all 'tasks' publicly available:

hoodie.store.findAll('tasks').publish();

or publish a single task:

hoodie.store.find('tasks', 'taskID12345').publish();

Same goes for unpublishing:

hoodie.store.findAll('tasks').unpublish();
 
hoodie.store.find('tasks', 'taskID12345').unpublish();

Accessing publicly shared files:

hoodie.public.findAll('tasks').done(function (docs) {
  console.log(docs);  // logs all public docs
});

Testing:

grunt

Keywords

none

install

npm i hoodie-plugin-public-share

Downloadsweekly downloads

1

version

1.0.0

license

none

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability