How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • const assert = require('assert/strict');
    
    assert.strictEqual(1, 2);
    // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
    //
    // 1 !== 2
    
    assert.strictEqual(1, 1);
    // OK
    
    assert.strictEqual('Hello foobar', 'Hello World!');
    // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
    // + actual - expected
    //
    // + 'Hello foobar'
    // - 'Hello World!'
    //          ^
    
    const apples = 1;
    const oranges = 2;
    assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
    // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
    
    assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
    // TypeError: Inputs are not identical
    Docs
  • assert.strictEqual(true, true, 'these booleans are strictly equal');
    
    Docs
  • assert.notStrictEqual(3, '3', 'no coercion for strict equality');
    
    Docs
  • const assert = require('assert/strict');
    
    assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
    // AssertionError: Expected inputs to be strictly deep-equal:
    // + actual - expected ... Lines skipped
    //
    //   [
    //     [
    // ...
    //       2,
    // +     3
    // -     '3'
    //     ],
    // ...
    //     5
    //   ]
    Docs
  • import { strict as assert } from 'assert';
    
    assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
    // AssertionError: Expected inputs to be strictly deep-equal:
    // + actual - expected ... Lines skipped
    //
    //   [
    //     [
    // ...
    //       2,
    // +     3
    // -     '3'
    //     ],
    // ...
    //     5
    //   ]
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples