/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
status
packages/shared/endsWith.js
13 строк
385 B
Dominic Gannaway
[Flare] Revise responder event types (#16081)
08 июл 2019, 16:35
Не верифицирован
08 июл 2019, 16:35
67e3f3f
Код
Авторство
О чём код?
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ export default function endsWith(subject: string, search: string): boolean { const length = subject.length; return subject.substring(length - search.length, length) === search; }