How to use human-interval - 10 common examples

To help you get started, we’ve selected a few human-interval examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bipbop / jurischain / test / saucelabs.spec.ts View on Github external
import humanInterval from 'human-interval'

import { createDriver, ie11, latestChrome, latestFirefox, latestSafari } from './create-driver'
import initServer from './server'

jest.setTimeout(humanInterval('30 minutes') as number)

describe('saucelabs tests', function() {
  it('should call \'jurischain\' event ', async function() {
    const baseUrl = await initServer()
    const builderConfiguration = ie11
    const driver = await createDriver(undefined, undefined, builderConfiguration)

    try {
      await driver.manage().window().maximize()
      await driver.get(baseUrl)

      await driver.wait(async driver => {
        const element = await driver.findElement( { className: 'jurischain-captcha__text' })
        const text = await element.getText()

        if (text === 'Seu acesso foi validado com sucesso.') {
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
'use strict';

import * as _ from 'lodash';
const humanInterval = require('human-interval');

humanInterval.languageMap['eleven'] = 11;
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;

export function getMilisecondsInterval(value: string | number | undefined, defaultValue?: number) {
    if (!value) {
        return defaultValue;
    }
    if (_.isNumber(value)) {
        return value;
    }
    return humanInterval(value);
}
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;

export function getMilisecondsInterval(value: string | number | undefined, defaultValue?: number) {
    if (!value) {
        return defaultValue;
    }
    if (_.isNumber(value)) {
        return value;
    }
    return humanInterval(value);
}
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
humanInterval.languageMap['eleven'] = 11;
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;

export function getMilisecondsInterval(value: string | number | undefined, defaultValue?: number) {
    if (!value) {
        return defaultValue;
    }
    if (_.isNumber(value)) {
        return value;
    }
    return humanInterval(value);
}
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
import * as _ from 'lodash';
const humanInterval = require('human-interval');

humanInterval.languageMap['eleven'] = 11;
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;

export function getMilisecondsInterval(value: string | number | undefined, defaultValue?: number) {
    if (!value) {
        return defaultValue;
    }
    if (_.isNumber(value)) {
        return value;
    }
    return humanInterval(value);
}
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
import * as _ from 'lodash';
const humanInterval = require('human-interval');

humanInterval.languageMap['eleven'] = 11;
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;

export function getMilisecondsInterval(value: string | number | undefined, defaultValue?: number) {
    if (!value) {
        return defaultValue;
    }
    if (_.isNumber(value)) {
        return value;
    }
    return humanInterval(value);
}
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
'use strict';

import * as _ from 'lodash';
const humanInterval = require('human-interval');

humanInterval.languageMap['eleven'] = 11;
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
'use strict';

import * as _ from 'lodash';
const humanInterval = require('human-interval');

humanInterval.languageMap['eleven'] = 11;
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;

export function getMilisecondsInterval(value: string | number | undefined, defaultValue?: number) {
    if (!value) {
        return defaultValue;
    }
    if (_.isNumber(value)) {
github TreeGateway / tree-gateway / src / utils / time-intervals.ts View on Github external
'use strict';

import * as _ from 'lodash';
const humanInterval = require('human-interval');

humanInterval.languageMap['eleven'] = 11;
humanInterval.languageMap['twelve'] = 12;
humanInterval.languageMap['thirteen'] = 13;
humanInterval.languageMap['fourteen'] = 14;
humanInterval.languageMap['fifteen'] = 15;
humanInterval.languageMap['sixteen'] = 16;
humanInterval.languageMap['seventeen'] = 17;
humanInterval.languageMap['eighteen'] = 18;
humanInterval.languageMap['nineteen'] = 19;
humanInterval.languageMap['twenty'] = 20;
humanInterval.languageMap['thirty'] = 30;
humanInterval.languageMap['fourty'] = 40;
humanInterval.languageMap['fifty'] = 50;
humanInterval.languageMap['sixty'] = 60;
humanInterval.languageMap['seventy'] = 70;
humanInterval.languageMap['eighty'] = 80;
humanInterval.languageMap['ninety'] = 90;
humanInterval.languageMap['hundred'] = 100;

export function getMilisecondsInterval(value: string | number | undefined, defaultValue?: number) {
    if (!value) {

human-interval

Human readable time measurements

MIT
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis

Popular human-interval functions