Skip to content

Instantly share code, notes, and snippets.

View sdnts's full-sized avatar

Siddhant sdnts

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sdnts on github.
  • I am sdnts (https://keybase.io/sdnts) on keybase.
  • I have a public key ASDzCreGV7gGSqnC89Blq7aqiW6qv9RKc4K9mDli0n2S0Qo

To claim this, I am signing this object:

To dump all IndexedDB data to console:

(() => {
  const asyncForEach = (array, callback, done) => {
    const runAndWait = i => {
      if (i === array.length) return done();
      return callback(array[i], () => runAndWait(i + 1));
    };
 return runAndWait(0);
@sdnts
sdnts / example.md
Last active January 10, 2023 20:50
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});