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 GetIntrinsic = require('get-intrinsic');4var hasSymbols = require('has-symbols')();5 6var $TypeError = require('es-errors/type');7var isObject = require('es-object-atoms/isObject');8var IteratorPrototype = GetIntrinsic('%IteratorPrototype%', true);9 10var AdvanceStringIndex = require('./AdvanceStringIndex');11var CreateIterResultObject = require('./CreateIterResultObject');12var DefineMethodProperty = require('./DefineMethodProperty');13var Get = require('./Get');14var OrdinaryObjectCreate = require('./OrdinaryObjectCreate');15var RegExpExec = require('./RegExpExec');16var Set = require('./Set');17var ToLength = require('./ToLength');18var ToString = require('./ToString');19 20var SLOT = require('internal-slot');21var setToStringTag = require('es-set-tostringtag');22 23var RegExpStringIterator = function RegExpStringIterator(R, S, global, fullUnicode) {24 if (typeof S !== 'string') {25 throw new $TypeError('`S` must be a string');26 }27 if (typeof global !== 'boolean') {28 throw new $TypeError('`global` must be a boolean');29 }30 if (typeof fullUnicode !== 'boolean') {31 throw new $TypeError('`fullUnicode` must be a boolean');32 }33 SLOT.set(this, '[[IteratingRegExp]]', R);34 SLOT.set(this, '[[IteratedString]]', S);35 SLOT.set(this, '[[Global]]', global);36 SLOT.set(this, '[[Unicode]]', fullUnicode);37 SLOT.set(this, '[[Done]]', false);38};39 40if (IteratorPrototype) {41 RegExpStringIterator.prototype = OrdinaryObjectCreate(IteratorPrototype);42}43 44var RegExpStringIteratorNext = function next() {45 var O = this;46 if (!isObject(O)) {47 throw new $TypeError('receiver must be an object');48 }49 if (50 !(O instanceof RegExpStringIterator)51 || !SLOT.has(O, '[[IteratingRegExp]]')52 || !SLOT.has(O, '[[IteratedString]]')53 || !SLOT.has(O, '[[Global]]')54 || !SLOT.has(O, '[[Unicode]]')55 || !SLOT.has(O, '[[Done]]')56 ) {57 throw new $TypeError('"this" value must be a RegExpStringIterator instance');58 }59 if (SLOT.get(O, '[[Done]]')) {60 return CreateIterResultObject(void undefined, true);61 }62 var R = SLOT.get(O, '[[IteratingRegExp]]');63 var S = SLOT.get(O, '[[IteratedString]]');64 var global = SLOT.get(O, '[[Global]]');65 var fullUnicode = SLOT.get(O, '[[Unicode]]');66 var match = RegExpExec(R, S);67 if (match === null) {68 SLOT.set(O, '[[Done]]', true);69 return CreateIterResultObject(void undefined, true);70 }71 if (global) {72 var matchStr = ToString(Get(match, '0'));73 if (matchStr === '') {74 var thisIndex = ToLength(Get(R, 'lastIndex'));75 var nextIndex = AdvanceStringIndex(S, thisIndex, fullUnicode);76 Set(R, 'lastIndex', nextIndex, true);77 }78 return CreateIterResultObject(match, false);79 }80 SLOT.set(O, '[[Done]]', true);81 return CreateIterResultObject(match, false);82};83DefineMethodProperty(RegExpStringIterator.prototype, 'next', RegExpStringIteratorNext, false);84 85if (hasSymbols) {86 setToStringTag(RegExpStringIterator.prototype, 'RegExp String Iterator');87 88 if (Symbol.iterator && typeof RegExpStringIterator.prototype[Symbol.iterator] !== 'function') {89 var iteratorFn = function SymbolIterator() {90 return this;91 };92 DefineMethodProperty(RegExpStringIterator.prototype, Symbol.iterator, iteratorFn, false);93 }94}95 96// https://262.ecma-international.org/15.0/#sec-createregexpstringiterator97 98module.exports = function CreateRegExpStringIterator(R, S, global, fullUnicode) {99 // assert R.global === global && R.unicode === fullUnicode?100 return new RegExpStringIterator(R, S, global, fullUnicode);101};102 