PageSourceSearch

https://www.barentswatch.no/data/assets/texts-DfYr84Gj.js

js barentswatch.no collected 2026-09-24 18:18:22 UTC 1,209 bytes, 1 lines download raw bytes

1import"./logging-r5cmjDxL.js";import{n as e}from"./locale-gNubC2WI.js";import{t}from"./each-Cyg9bWHB.js";t();function n(e){if(e!=null)return e&&e.charAt(0).toUpperCase()+e.slice(1)}function r(...t){if(t.length===0)return;let n=t.pop(),r=t;return r.length===0?n:`${r.join(`, `)} ${e(`and`).toLowerCase()} ${n}`}if(import.meta.vitest){let{describe:e,it:t,expect:i,vi:a}=import.meta.vitest;a.mock(`../stores/locale`,()=>({translate:e=>{switch(e){case`and`:return`og`;default:return e}}})),e(`capitalize`,()=>{t(`returns undefined for undefined`,()=>{i(n(void 0)).toBeUndefined()}),t(`returns empty string for empty input`,()=>{i(n(``)).toBe(``)}),t(`capitalizes the first letter of a single character`,()=>{i(n(`a`)).toBe(`A`)}),t(`capitalizes the first letter of a string`,()=>{i(n(`hello World`)).toBe(`Hello World`)})}),e(`concatenate`,()=>{t(`returns undefined for no arguments`,()=>{i(r()).toBeUndefined()}),t(`returns the single argument if only one is provided`,()=>{i(r(`Hello`)).toBe(`Hello`)}),t(`concatenates two arguments with "and"`,()=>{i(r(`en`,`to`)).toBe(`en og to`)}),t(`concatenates multiple arguments with commas and "and"`,()=>{i(r(`en`,`to`,`tre`)).toBe(`en, to og tre`)})})}export{n as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.