Socket
Book a DemoInstallSign in
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
npmnpm
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
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

Alfred

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.