![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
ifttt-these
Advanced tools
This package is middleware for IFTTT, allowing custom triggers and actions.
#ifttt-these
This package is middleware for IFTTT, allowing custom triggers and actions. Ever wanted to use boolean logic for an action? This is the right place to look.
This package is under development, but should work as-is. If you have any suggestions on better terminologies/function names, please let me know!
Run npm install ifttt-these
Username and password are required for receiving triggers from the ifttt server; a key from the Maker channel is required for sending an action to the server.
var IFTTT_These = require("ifttt-these");
var ifttt = new IFTTT_These({
username: "username",
password: "password",
key: "makerkey"
});
Messages are received through the wordpress post action. There are two types of messages that we can receive. ##Receiving
##Example
For this example, I want to to get a phone call if I am late for work. Most of the work is going to be on the IFTTT side of things:
{location:"unknown"}
, and when I get home, send {location: "home"}
.This is all of the code I need for the middleware.
ifttt.ifThisThen(
function() { return ifttt.wasTriggered("TimeToLeave") && ifttt.state.location !== "home"; },
function() {
ifttt.trigger("Call", function(){return ["Wake up you're late for work."]})
});
##Functions
###softTrigger(string)
/**
* Software trigger
* @param {String} action name of the trigger
*/
###ifThis(bool())
/**
* One-time if-this
* @param {function} bool Function which will evaluate true for a trigger.
* @returns {Promise} Promise
*/
###ifThisThen(bool(), callback())
/**
* Set up a condition for trigger
* @param {function} bool Function which will evaluate true for a trigger.
*/
###wasTriggered(string)
/**
* Was Triggered
* @param {String} name Name of item to check if triggered
* @return {bool} true if the item was triggered.
*/
###setState(Object)
/**
* Set internal state
* @param {Object} state State variables to modify.
*/
###trigger(eventName, argsFunction)
/**
* Send a trigger to the ifttt server
* @param string eventName the name of the trigger which will be
* specified by the Maker channel
* @param function argsFunction function which will return an array of up to
* 3 booleans, which will be maker values.
*/
###triggerPromise(eventName, argsFunction)
/**
* Promise to send a trigger to the ifttt server
* @param string eventName the name of the trigger which will be
* specified by the Maker channel
* @param function argsFunction function which will return an array of up to
* 3 booleans, which will be maker values.
* @return Promise
*/
FAQs
This package is middleware for IFTTT, allowing custom triggers and actions.
The npm package ifttt-these receives a total of 2 weekly downloads. As such, ifttt-these popularity was classified as not popular.
We found that ifttt-these demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.