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

alfred-item

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

alfred-item

Wrapper for alfred workflow item in Node.js / io.js.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Alfred Item

Wrapper for alfred workflow item in Node.js / io.js.

Installation

$ npm install alfred-item

Usage

First you should require this package:

var AlfredItem = require("alfred-item");

Then you should new an item:

var item = new AlfredItem();

You may add an item into it:

item.addItem(uid, title, subtitle, icon, options);

uid is the uid attribute of item.

options which is optional contains several key-value pairs live as attributes in item.

For an example, when options is like:

{ autocomplete: "" }

The result will be like:

<item uit="..." autocomplete="">
  <title>...</title>
  <subtitle>...</subtitle>
  <icon>...</icon>
</item>

You may delete an item via uid:

item.delItemViaUid(uid);

And you may get the XML string:

var xml = item.output();
console.log(xml);
console.log(item);

All APIs

addItem(uid, title, subtitle, icon[, options]);
delItemViaText(key, text);
delItemViaAttr(key, attr);
delItemViaTitle(title);
delItemViaSubtitle(subtitle);
delItemViaIcon(icon);
delItemViaUid(uid);
output();

Contribute

You're welcome to make pull requests!

Keywords

FAQs

Package last updated on 13 Feb 2015

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