isText static method

bool isText(
  1. String path
)

Whether path is hashed as text.

Implementation

static bool isText(String path) {
  final name = path.split('/').last.toLowerCase();
  if (name == 'license' || name == 'licence' || name == 'changelog') {
    return true;
  }
  final dot = name.lastIndexOf('.');
  return dot >= 0 && textExtensions.contains(name.substring(dot + 1));
}