npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mobilecaddy-app-addon-recent-items

v0.1.0

Published

AngularJS service used to add, retrieve and update recent items that the user has viewed within a MobileCaddy application.

Downloads

3

Readme

MobileCaddy App Addon - Recent Items

Overview

AngularJS service used to add, retrieve and update recent items that the user has viewed within a MobileCaddy application.

Build Status

Roadmap

  • Encrypted DB support
  • Updating recent item objects following devUtils.updateRecords() and sync completion processes.
  • Remove recent item entries when they are deleted from localDB, or maked as deleted following sync completion processes.

Installation

npm install mobilecaddy-app-addon-recent-items

The installation will include the tasks of moving the relevant scripts into the correct place of your MobileCaddy application project structure. The relevant unit tests will also be included.

Configuring

You can set the configuration information of the recent items, such as the maximum number of items, if they will be saved in localStorage or encrypted in the database, the type of items, among other details. This can be run in the .run in the app.js file, thus it can be updated by the developer easily.

RecentItemsService.setConfig({
    maxItems: 50,
    encrypted: false,
    tables: [
      {
        name: 'Account',
        icon: 'ion-folder',
        href: '/accounts/:Id'
      },
      {
        name: 'Contact',
        icon: 'ion-person',
        href: '/accounts/:AccountId/contacts/:Id'
      }
    ]
  });

Syntax

setConfig( { maxItems, encrypted, tables } );

Parameters

maxItems Optional

How many recent items to store. Defaults to 10.

encrypted Optional

Whether or not to use the encrypted database to store the recent items. If false, stored in localStorage. Defaults to false. Note: Not yet supported.

tables

Array of objects configuring each table to be included in the global search, thus;

[{
  name,   // string:
  icon,   // string: Ionicon to be used in enriched output
  href    // string: State URL to be used for direct record access in enriched output.
}]

Calls Available

addRecentItem

Adds an item to the recent items list.

Syntax

addRecentItem( type, object );

Parameters

type : String. Represents the type of the new item, e.g. "Account".

object : Object. It is the object that will be added to the recent items list.

Example

var object = {
	Id: 'acc1',
	Name: 'MobileCaddy'
};

RecentItemsService.addRecentItem('Account', object);

getRecentItems

Retrieves an array of recent items.

Syntax

getRecentItems( type, amount, config );

Parameters

type : String | NULL . Represents the type of the items, e.g. "Account". NULL can be supplied.

amount : Number. Refers to the number of recent items that the controller wants to receive. It's optional.

config : Boolean. Defines if the user wants to get config information about the recent items. It's optional.

Returns

An array of recent item objects.

Example

With this call we would get the two most recent items of type Account that don't include configuration information, such as icon and href.

var recentItems = RecentItemsService.getRecentItems('Account', 2);
console.log("Recent items array", recentItems);

clearRecentItems

Syntax

clearRecentItems( type );

Parameters

type : String. Represents the type of the items, e.g. "Account". Optional.

Examples

RecentItemsService.clearRecentItems();

RecentItemsService.clearRecentItems('Account');