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 🙏

© 2024 – Pkg Stats / Ryan Hefner

service-portal-snippets

v1.0.5

Published

A collection of ServiceNow Service Portal snippets

Downloads

4

Readme

Service Portal Snippets for VS Code

This extension for Visual Studio Code adds a handy collection of ServiceNow Service Portal snippets. The snippets adhere to best practice by following the Service Portal: Style Guide.

Use Extension

See the CHANGELOG for the latest changes.

Usage

To generate a snippet, simply type part of the snippet and press enter.

HTML Snippets

| Snippet | Purpose | | ----------------------- | ------------------------------------- | | sp-ng-class-attribute | ng-class with attribute | | sp-ng-class-css | ng-class with CSS class | | sp-ng-if | ng-if | | sp-ng-include | ng-include | | sp-ng-repeat | ng-repeat | | sp-ng-repeat-combo | ng-repeat with orderBy and track by | | sp-ng-repeat-orderBy | ng-repeat with orderBy | | sp-ng-repeat-track-by | ng-repeat with track by | | sp-modal-alert | Displays an alert | | sp-modal-confirm | Displays a confirmation message | | sp-modal-open | Opens a modal window using options | | sp-modal-prompt | Displays a prompt for user input | | sp-tag-embed-widget | Embed a widget using <widget> | | sp-util-embed-widget | Embed a widget using <sp-widget> |

Client Snippets

| Snippet | Purpose | | --------------------------- | ----------------------------------------- | | sp-ng-broadcast | $broadcast | | sp-ng-controller | Creates a client controller | | sp-ng-emit | $emit | | sp-ng-http | $http | | sp-ng-on | $on | | sp-ng-onInit | $onInit | | sp-modal-alert | Displays an alert | | sp-modal-confirm | Displays a confirmation message | | sp-modal-open | Opens a modal window with embedded widget | | sp-modal-prompt | Displays a prompt for user input | | sp-util-addErrorMessage | Displays a notification error message | | sp-util-addInfoMessage | Displays a notification info message | | sp-util-addTrivialMessage | Displays a trivial notification message | | sp-util-get | Embed a widget in the client script | | sp-util-get-options | Embed a widget with options | | sp-util-record-watch | Tool to capture real-time table updates |

Server Snippets

| Snippet | Purpose | | --------------------------- | ----------------------------------------- | | sp-record-addActiveQuery | Adds a filter to return active records | | sp-record-addEncodedQuery | Adds an encoded query to other queries | | sp-record-create | Creates a GlideRecord class for a table | | sp-record-deleteMultiple | Deletes multiple records | | sp-record-deleteRecord | Deletes the current record | | sp-record-get | A method used to query for single record | | sp-record-getRowCount | Get the number of rows for a query result | | sp-record-insert | Inserts a new record | | sp-record-setLimit | The maximum number of records to fetch | | sp-record-update | Updates the current record | | sp-record-updateMultiple | Updates multiple records | | sp-session-getClientIP | Returns the client IP address | | sp-session-getLanguage | Returns the session's language code | | sp-session-isLoggedIn | Returns true if the user is logged in | | sp-user-getDisplayName | Get the current user's display name | | sp-user-getEmail | Get the user's email address | | sp-user-getFirstName | Get the user's first name | | sp-user-getID | Get the sys_id of the current user | | sp-user-getLastName | Get the user's last name | | sp-user-getUserName | Get the user's username | | sp-user-hasRole | Determines if a user has a specified role | | sp-user-isMemberOf | Checks if the user is a member of a group |

UI Script Snippets

| Snippet | Purpose | | ----------------- | ------------------------------ | | sp-ng-component | Creates an AngularJS component | | sp-ng-module | Creates an AngularJS module | | sp-ng-service | Creates an AngularJS service |

Script Includes

| Snippet | Purpose | | ------------------- | ------------------------ | | sp-script-include | Creates a script include |

Pro Tip

Simply type the snippet without dashes to activate IntelliSense.

License

MIT License