{"id":20761302,"url":"https://github.com/2sky/linqjs","last_synced_at":"2025-10-30T11:24:56.552Z","repository":{"id":33606909,"uuid":"37259084","full_name":"2sky/linqjs","owner":"2sky","description":null,"archived":false,"fork":false,"pushed_at":"2021-10-19T18:51:35.000Z","size":4871,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-18T05:30:41.544Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2sky.png","metadata":{"files":{"readme":"ReadMe.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-11T12:15:14.000Z","updated_at":"2021-10-19T18:51:39.000Z","dependencies_parsed_at":"2022-09-12T22:00:55.183Z","dependency_job_id":null,"html_url":"https://github.com/2sky/linqjs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2Flinqjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2Flinqjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2Flinqjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2sky%2Flinqjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2sky","download_url":"https://codeload.github.com/2sky/linqjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243076603,"owners_count":20232438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T10:18:52.124Z","updated_at":"2025-10-30T11:24:51.508Z","avatar_url":"https://github.com/2sky.png","language":"JavaScript","readme":"/*--------------------------------------------------------------------------\n * linq.js - LINQ for JavaScript\n * ver 3.0.3-Beta4 (Oct. 9th, 2012)\n *\n * created and maintained by neuecc \u003cils@neue.cc\u003e\n * licensed under MIT License\n * http://linqjs.codeplex.com/\n *------------------------------------------------------------------------*/\n\n2012-10-09 v3.0.3-Beta4\n\nadd TypeScript type declaraion file(typescript/linq.js.d.ts, linq.jquery.d.ts)\n\n2012-09-16 s/v3.0.2-RC/v3.0.2-Beta3/::Notice\n\nfix orderByDescending to stable sort\nremove scan resultSelector overload\nrename tojQueryRaw to tojQueryAsArray\nflip argument of firstOrDefault,lastOrDefault,singleOrDefault. first is predicate, second is defaultValue.\ndefaultValue of orDefault changed to null\nEnumerable.choice and Enumerable.cycle allow Enumerable\nEnumerable.from supports IIterable\u003cT\u003e(WinMD)\nargument of alternate allows Enumerable\nadd AMD support(\"linqjs\")\nimproved fit to latest RxJS(on GitHub Sep 10, 2012 version)\nrepositry convert to git\n\n//\n\n2012-07-26 v3.0.1-Beta2::Notice\n\nfix bug indexOf\nwriteLine overload back to v2\nfixed bug, extendTo(Array) isn't optimized for Array\nfixed bug, defer define \"enumerator\" to global\nindexOf, lastIndexOf allow predicate\nchanged Enumerable.from(object) enumerate only own property\nimprovement all code snippets\nadd isExpr to linq.qunit.js\n\n//\n\n2012-07-19 v3 Beta::Notice\n\nall methods rename UpperCamelCase to lowerCamelCase\n\nfollowing methods are changed name\nReturn -\u003e make\nCascadeBreadthFirst -\u003e traverseBreadthFirst\nCascadeDepthFirst -\u003e traverseDepthFirst\nBufferWithCount -\u003e buffer\nToString -\u003e toJoinedString\nDo -\u003e doAction\nLet -\u003e letBind\nMemoizeAll -\u003e memoize\nCatch -\u003e catchError\nFinally -\u003e finallyAction\nToJSON -\u003e toJSONString\n\nfollowing methods are changed behavior\nwriteLine : document.write(value + \"\u003cbr /\u003e\") -\u003e document.writeln(value), overload changed\nzip, concat allow multiple arguments\n\nadd utility methods\nEnumerable.Utils.createLambda\nEnumerable.Utils.createEnumerable\nEnumerable.Utils.createEnumerator\nEnumerable.Utils.extendTo\n\nadd enumerable methods\nEnumerable.defer\nmerge\nasEnumerable\nchoose\nisEmpty\ndistinctUntilChanged\nweightedSample\nlog\n\nperformance optimization\nwhere-\u003eselect and where-\u003ewhere,... and select-\u003eselect,...\nrange, rangeDown, rangeTo\n\nadd new extension\nlinq.qunit.js\n\nfix extensions to latest library version\nlinq.jquery.js\nlinq.rx.js\n\nremoved jQuery plugin version\n\nlicence changed Ms-PL to MIT\n\n--\n\n//\n\n\nFeatures\n* implement all .NET 4.0 methods and many extra methods (inspiration from Rx, Achiral, Haskell, Ruby, etc...)\n* complete lazy evaluation\n* Full IntelliSense support for VisualStudio\n* two versions - linq.js(Normal) and jquery.linq.js(jQuery plugin)\n* support Windows Script Host\n* binding for Reactive Extensions for JavaScript(RxJS)\n* NuGet install support(linq.js, linq.js-jQuery, linq.js-Bindings)\n\nTutorial\n\nlinq.js\n---\n    \u003cscript type=\"text/javascript\" src=\"linq.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n        // load linq.js -\u003e Enumerable\n        Enumerable.Range(1,10)....\n    \u003c/script\u003e\n\njQuery.linq.js (jQuery plugin)\n---\n    \u003cscript type=\"text/javascript\" src=\"jquery.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"jquery.linq.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n        // load jquery.linq.js -\u003e $.Enumerable\n        $.Enumerable.Range(1,10)....\n    \u003c/script\u003e\n\n    jQuery plugin version is added two methods.\n    * Enumerable.prototype.TojQuery (Enumerable to jQuery object)\n    * jQuery.prototype.toEnumerable (jQuery object to Eunmerable)\n\nbindings/linq.jquery.js\n---\n    \u003cscript type=\"text/javascript\" src=\"linq.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"jquery.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"linq.jquery.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n        Enumerable.Range(1,10).TojQuery()...\n    \u003c/script\u003e\n    \n    jQuery Bindings added two methods(TojQuery and toEnumerable)\n    There are same as plugin version.\n\nbinding/linq.rx.js\n---\n    more tutorial see linq.js CodePlex's Documentation\n    \n    \u003cscript type=\"text/javascript\" src=\"rx.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"linq.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"linq.rx.js\"\u003e\u003c/script\u003e\n\n    or\n    \n    \u003cscript type=\"text/javascript\" src=\"rx.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"jquery.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"jquery.linq.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"linq.rx.js\"\u003e\u003c/script\u003e\n\n-vsdoc.js\n---\n    Visual Studio 2010 - as is.\n    Visual Studio 2008 - install SP1 and Patch KB958502.\n\n    linq-vsdoc.js(or jquery.linq-vsdoc.js) puts in same directory.\n\n    if not html then write xml referrence tag on top.\n    for example\n    /// \u003creference path=\"linq.js\" /\u003e\n\nfor Windows Script Host\n---\n    create wsf file.\n    example\n\n    \u003cjob id=\"Main\"\u003e\n        \u003cscript language=\"JScript\" src=\"linq.js\"\u003e\u003c/script\u003e\n        \u003cscript language=\"JScript\"\u003e\n            var dir = WScript.CreateObject(\"Scripting.FileSystemObject\").GetFolder(\"C:\\\\\");\n\n            var itemNames = Enumerable.From(dir.SubFolders)\n                .Concat(dir.Files)\n                .Select(\"$.Name\")\n                .ToArray();\n        \u003c/script\u003e\n    \u003c/job\u003e\n\nHow to use CodeSnippets\n---\n    open Visual Studio 2010's Code Snippet Manager(Ctrl+K, Ctrl+B)\n    click import button and select snippets/*.snippet\n\n    func0 = function () { return /*cursor*/}\n    func1 = function (x) { return /*cursor*/}\n    func2 = function (x, y) { return /*cursor*/}\n    action0 = function () { /*cursor*/}\n    action1 = function (x) { /*cursor*/}\n    action2 = function (x, y) { /*cursor*/}\n    efrom = Enumerable.From()\n    erange = Enumerable.Range()\n    jqfrom = $.Enumerable.From()\n    jqrange = $.Enumerable.Range()\n\n// history\n\n2011-01-21 ver 2.2.0.2\n    Add\n        bindings/linq.jquery.js\n    Info\n         NuGet Package Added to NuGet Gallery\n\n2011-01-18 ver 2.2.0.1\n    Change\n        ToObservable(linq.rx.js) receive scheduler\n        OrderBy optimized performance\n        minifier/jQuery genereted by F# Script\n    Bug Fix\n        remove two not declared var\n\n2010-06-28 ver 2.2.0.0\n    Add Method\n        TakeFromLast\n        ToJSON\n    Add File\n        rewrite all tests from JSUnit to QUnit\n        binding for RxJS(Reactive Extensions for JavaScript)\n        add RxVSDocGenerator(rx-vsdoc.js generator for RxJS)\n        add code snippets for Visual Studio\n    Change\n        wrap array (Enumerable.From(array)) optimized performance\n        Grouping optimized performance\n        Enumerable.From(array)'s array allow function element\n        if TakeExceptLast's count under 0 then return all sequence\n        add default iterator variable's second, third, fourth($$, $$$, $$$$)\n    Bug Fix\n        MemoizeAll can't work when sequence contains undefined\n        Sum can't work when sequence is empty(fixed return 0)\n        vsdoc's Grouping elementSelector is short of summary\n\n2010-05-18 ver 2.1.0.0\n    Add Class\n        Dictionary\n        Lookup\n        Grouping\n        OrderedEnumerable\n\n    Add Method\n        ToDictionary\n        MemoizeAll\n        Share\n        Let\n\n    Add Overload\n        Join (compareKey)\n        GroupJoin (compareKey)\n        GroupBy (compareKey)\n        PartitionBy (compareKey)\n        ToLookup (compareKey)\n\n    Breaking Change\n        return type of ToLookup -\u003e from Array to Lookup\n        Enumerate type of GroupBy,PartitionBy -\u003e from KeyValuePair to Grouping\n\n    Change\n        implimentation of OrderBy/ThenBy changed CLR compatible (maybe...)\n\n    Bug Fix\n        GroupBy Key auto converts to string\n        All set methods do not distinction between boolean and string and number\n        Scan and All Paging Methods do not work if sequence contains undefined\n\n2010-04-23 ver 2.0.0.0\n    all code rewrite from scratch.\n    enumerator support Dispose.\n\n    namespace changed\n        E, Linq.Enumerable -\u003e Enumerable\n\n    delete methods\n        ToJSON\n        ToTable\n        TraceF\n        RangeDownTo\n\n    rename methods\n        ZipWith -\u003e Zip\n        Slice -\u003e BufferWithCount\n        Times -\u003e Generate\n\n    change methods\n        From (add argument - WSH's IEnumerable)\n        Trace (write to console.log)\n        RangeTo (contains downto)\n        OrderBy/ThenBy (support string sort)\n\n    add methods\n        MaxBy\n        MinBy\n        OfType\n        Catch\n        Finally\n        PartitionBy\n        Alternate\n        TakeExceptLast\n        RepeatWithFinalize\n\n    add files\n        jquery.linq.js\n        and minifier file by Microsoft Ajax Minifier(-HC)\n\n    delete files\n        linq.xml.js (move to branches)\n        linq.tools.js (move to branches and rename linq.utils.js)\n\n2009-06-15 ver 1.3.0.2\n    Add Make, CascadeDepthFirst/CascadeBreadthFirst.\n    ForEach support continue/break.\n\n2009-06-05 ver 1.3.0.1\n    IntelliSense Support.\n    dom functional construction(Linq to Xml).\n\n2009-05-24 ver 1.3.0.0\n    Add - Unfold, Matches, Insert, IndexOf, LastIndexOf\n    Change - From\u003cString\u003e\n    Add linq.tools.js - Stopwatch.Bench, StringBuilder.Reverse, HashSet\n\n2009-05-17 ver 1.2.0.3\n    Add linq.tools.js - Stopwatch, DateUtility.IsLeapYear, DateUtility.DaysInMonth\n\n2009-05-16 ver 1.2.0.2\n    Add new Sample - linq.tools.js\n\n2009-05-07 ver 1.2.0.1\n    FixBug - ToJSON\n    Add - Times\n    Add Overload step - Range, RangeDown, RangeTo, RangeDownTo, ToInfinity, ToNegativeInfinity\n\n2009-04-26 ver 1.2.0.0\n    FixBug - Set Operations(Disctint,Union,Intersect,Except)\n    FixBug - ToJSON\n    Add compareSelector - Contains, Distinct, Except, Intersect, SequenceEqual, Union\n\n2009-04-19 ver 1.1.0.0\n    Add new Sample - linqfader\n    Add linq.xml.js\n\n2009-04-10 ver 1.0.0.1\n    Add - Choice\n    Add - RangeTo\n    Add - RangeDownTo\n    Fix - Cycle\n\n2009-04-04\n    1st Release","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2sky%2Flinqjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2sky%2Flinqjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2sky%2Flinqjs/lists"}