
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
JavaScript library for the Mergent API. See https://mergent.co for details.
The Mergent JavaScript library provides convenient access to the Mergent API from applications written in the JavaScript language.
Install the package with:
npm install mergent --save
# or
yarn add mergent
The library needs to be configured with your project's API key. Set
Mergent.api_key
to its value:
const Mergent = require("mergent");
// set the Mergent API key
const mergent = new Mergent("...");
// create a Task that will make an HTTP request in 5 minutes
mergent.tasks
.create({
request: { url: "...", body: "Hello, world!" },
delay: { minutes: 5 },
})
.then((task) => console.log(task))
.catch((error) => console.error(error));
// create a recurring Schedule that will make an HTTP request every minute
mergent.schedules
.create({
request: { url: "...", body: "Hello, world!" },
cron: "* * * * *",
})
.then((task) => console.log(task))
.catch((error) => console.error(error));
import Mergent from "mergent";
// set the Mergent API key
const mergent = new Mergent("...");
// create a Task that will make an HTTP request in 5 minutes
mergent.tasks
.create({
request: { url: "...", body: "Hello, world!" },
delay: { minutes: 5 },
})
.then((task) => console.log(task))
.catch((error) => console.error(error));
// create a recurring Schedule that will make an HTTP request every minute
mergent.schedules
.create({
request: { url: "...", body: "Hello, world!" },
cron: "* * * * *",
})
.then((task) => console.log(task))
.catch((error) => console.error(error));
See the Mergent JavaScript docs for more details.
After checking out the repo, run npm install
to install dependencies. Then,
run npm test
to run the tests.
Bug reports and pull requests are welcome on GitHub at https://github.com/mergentlabs/mergent-js.
npm version <version>
(this makes a new commit)git push --tags
npm run package
npm publish
The library is available as open source under the terms of the MIT License.
[1.7.0] - 2024-04-29
FAQs
JavaScript library for the Mergent API. See https://mergent.co for details.
We found that mergent demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.