Socket
Socket
Sign inDemoInstall

hoodie-plugin-public-share

Package Overview
Dependencies
4
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

hoodie-plugin-public-share


Version published
Maintainers
1
Created

Readme

Source

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

FAQs

Last updated on 28 Mar 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc