1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-03 23:28:02 +00:00

Add Require Additional JS Libraries In Postman as a mac til

This commit is contained in:
jbranchaud
2017-09-28 08:56:33 -05:00
parent 42a88101e4
commit 6be133a4f2
2 changed files with 22 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/).
For a steady stream of TILs from a variety of rocketeers, checkout For a steady stream of TILs from a variety of rocketeers, checkout
[til.hashrocket.com](https://til.hashrocket.com/). [til.hashrocket.com](https://til.hashrocket.com/).
_566 TILs and counting..._ _567 TILs and counting..._
--- ---
@@ -242,6 +242,7 @@ _566 TILs and counting..._
- [Display A Message With Alfred](mac/display-a-message-with-alfred.md) - [Display A Message With Alfred](mac/display-a-message-with-alfred.md)
- [Insert A Non-Breaking Space Character](mac/insert-a-non-breaking-space-character.md) - [Insert A Non-Breaking Space Character](mac/insert-a-non-breaking-space-character.md)
- [List All The Say Voices](mac/list-all-the-say-voices.md) - [List All The Say Voices](mac/list-all-the-say-voices.md)
- [Require Additional JS Libraries In Postman](mac/require-additional-js-libraries-in-postman.md)
- [Resizing Both Corners Of A Window](mac/resizing-both-corners-of-a-window.md) - [Resizing Both Corners Of A Window](mac/resizing-both-corners-of-a-window.md)
### MySQL ### MySQL

View File

@@ -0,0 +1,20 @@
# Require Additional JS Libraries In Postman
When writing pre-request scripts and test scripts as part of a Postman
request, you aren't limited to vanilla JavaScript. There are a handful of
libraries that can be required where needed.
This short list of available libraries includes `cherrio`, `lodash`, and
`moment`.
To pull one of these into a particular script, use the standard `require`
feature:
```javascript
var moment = require('moment');
var now = moment();
```
For a full list of what is available, check out [Postman's Sandbox API
Reference](https://www.getpostman.com/docs/postman/scripts/postman_sandbox_api_reference).