Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1'use strict';2 3var $TypeError = require('es-errors/type');4var callBound = require('call-bound');5var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');6var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');7 8var UTF16SurrogatePairToCodePoint = require('./UTF16SurrogatePairToCodePoint');9 10var $charAt = callBound('String.prototype.charAt');11var $charCodeAt = callBound('String.prototype.charCodeAt');12 13// https://262.ecma-international.org/12.0/#sec-codepointat14 15module.exports = function CodePointAt(string, position) {16 if (typeof string !== 'string') {17 throw new $TypeError('Assertion failed: `string` must be a String');18 }19 var size = string.length;20 if (position < 0 || position >= size) {21 throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');22 }23 var first = $charCodeAt(string, position);24 var cp = $charAt(string, position);25 var firstIsLeading = isLeadingSurrogate(first);26 var firstIsTrailing = isTrailingSurrogate(first);27 if (!firstIsLeading && !firstIsTrailing) {28 return {29 '[[CodePoint]]': cp,30 '[[CodeUnitCount]]': 1,31 '[[IsUnpairedSurrogate]]': false32 };33 }34 if (firstIsTrailing || (position + 1 === size)) {35 return {36 '[[CodePoint]]': cp,37 '[[CodeUnitCount]]': 1,38 '[[IsUnpairedSurrogate]]': true39 };40 }41 var second = $charCodeAt(string, position + 1);42 if (!isTrailingSurrogate(second)) {43 return {44 '[[CodePoint]]': cp,45 '[[CodeUnitCount]]': 1,46 '[[IsUnpairedSurrogate]]': true47 };48 }49 50 return {51 '[[CodePoint]]': UTF16SurrogatePairToCodePoint(first, second),52 '[[CodeUnitCount]]': 2,53 '[[IsUnpairedSurrogate]]': false54 };55};56 