From 82c7406c84e90c1dadb85fc65925565812dd28ae Mon Sep 17 00:00:00 2001 From: Louis Pilfold Date: Thu, 26 Oct 2023 12:13:33 +0100 Subject: Deprecate gleam/base --- src/gleam_stdlib.mjs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gleam_stdlib.mjs') diff --git a/src/gleam_stdlib.mjs b/src/gleam_stdlib.mjs index 5c55b24..645e22a 100644 --- a/src/gleam_stdlib.mjs +++ b/src/gleam_stdlib.mjs @@ -9,7 +9,6 @@ import { toBitArray, NonEmpty, CustomType, - BitArray, } from "./gleam.mjs"; import { CompileError as RegexCompileError, @@ -225,8 +224,8 @@ export function crop_string(string, substring) { return string.substring(string.indexOf(substring)); } -export function index_of(haystack, needle) { - return haystack.indexOf(needle) | 0; +export function contains_string(haystack, needle) { + return haystack.indexOf(needle) >= 0; } export function starts_with(haystack, needle) { -- cgit v1.2.3