Create custom calculators for your website.
Get the duration between two dates in days, hours, minutes, and seconds along with checking if they are the same.
Format a date string to another date string. For more examples on formatting, see the Sugar Date Format documentation.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
activecalculator: {
type: "app",
app: "activecalculator",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://app.activecalculator.com/api/v1/me`,
headers: {
"accept": `application/json`,
"x-ac-api-key": `${this.activecalculator.$auth.api_key}`,
},
})
},
})
export default defineComponent({
async run({ steps, $ }) {
const text = ' Hello world! ';
return text.trim()
},
})