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

alfred-hipsum

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alfred-hipsum - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

63

index.js

@@ -1,22 +0,47 @@

'use strict';
;(async () => {
'use strict'
const alfy = require('alfy');
const alfy = require('alfy')
const alfredNotifier = require('alfred-notifier')
const api = 'http://hipsterjesus.com/api'
const type = 'hipster-centric';
const isHTML = 'false';
const numParagraphs = parseInt(alfy.input, 10) || 1;
// Check for updates
alfredNotifier()
alfy.fetch(api, {
query: {
type: type,
html: isHTML,
paras: numParagraphs
}
}).then(data => {
alfy.output([{
title: `Hipsum Paragraphs: ${numParagraphs}`,
subtitle: data.text,
arg: data.text
}]);
});
const apiBase = 'https://hipsum.co/api'
const type = 'hipster-centric'
const startWithLorem = 0
const numParagraphs = parseInt(alfy.input, 10) || 1
const numSentences = parseInt(alfy.input, 10) || 1
let items = []
// Get paragraphs
const paragraphs = await alfy.fetch(apiBase, {
query: {
type: type,
startWithLorem: startWithLorem,
paras: numParagraphs,
},
})
items.push({
title: `Hipsum paragraphs: ${numParagraphs}`,
subtitle: 'Press enter to copy',
arg: paragraphs.join('\r\n'),
})
// Get sentences
const sentences = await alfy.fetch(apiBase, {
query: {
type: type,
startWithLorem: startWithLorem,
sentences: numSentences,
},
})
items.push({
title: `Hipsum sentences: ${numSentences}`,
subtitle: 'Press enter to copy',
arg: sentences.join('\r\n'),
})
alfy.output(items)
})()
{
"name": "alfred-hipsum",
"version": "1.0.0",
"version": "1.0.1",
"description": "Alfred 3 workflow to get hipster filler text.",

@@ -25,2 +25,3 @@ "main": "index.js",

"hipster",
"hipsum",
"placeholder",

@@ -27,0 +28,0 @@ "filler",

@@ -8,9 +8,7 @@ # Alfred Hipsum

TODO
<!-- ```
$ npm install --global alfred-hipsum
```
$ npm install -g alfred-hipsum
```
*Requires [Node.js](https://nodejs.org) 4+ and the Alfred [Powerpack](https://www.alfredapp.com/powerpack/).* -->
> __Note:__ Requires [Node.js](https://nodejs.org) 4+ and the Alfred [Powerpack](https://www.alfredapp.com/powerpack/).

@@ -22,3 +20,3 @@

> __Note:__ API is currently broken, so only one paragraph will be returned.
> __⚠️ Note:__ API is currently broken

@@ -30,3 +28,2 @@

- [Hipsum.co](http://hipsum.co)
- [HipsterJesus](http://hipsterjesus.com)

@@ -33,0 +30,0 @@

Sorry, the diff of this file is not supported yet

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