{"size": 460, "ext": "js", "max_stars_repo_path": "node_modules/is-color-stop/lib/isStop.js", "max_stars_repo_name": "GenaAiv/portfolio-website", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/is-color-stop/lib/isStop.js", "max_issues_repo_name": "GenaAiv/portfolio-website", "max_issues_repo_issues_event_min_datetime": "2020-03-10T07:47:34.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-12T00:20:30.000Z", "max_forks_repo_path": "node_modules/is-color-stop/lib/isStop.js", "max_forks_repo_name": "GenaAiv/portfolio-website", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 7, "max_forks_count": null, "avg_line_length": 19.1666666667, "max_line_length": 86, "alphanum_fraction": 0.5195652174}
'use strict';

const isCSSLengthUnit = require('./isCSSLengthUnit');
const unit = require('../util/unit');

function isStop(str) {
  let stop = !str;
  
  if (!stop) {
    const node = unit(str);
    if (node) {
      if (node.number === 0 || (!isNaN(node.number) && isCSSLengthUnit(node.unit))) {
        stop = true;
      }
    } else {
      stop = (/^calc\(\S+\)$/g).test(str);
    }
  }

  return stop;
}

module.exports = isStop;
