{"id":13670242,"url":"https://github.com/mootools/slick","last_synced_at":"2025-04-27T09:32:08.275Z","repository":{"id":708980,"uuid":"355621","full_name":"mootools/slick","owner":"mootools","description":"Standalone CSS Selector Parser and Engine. An official MooTools project.","archived":false,"fork":true,"pushed_at":"2018-10-06T18:31:30.000Z","size":2998,"stargazers_count":150,"open_issues_count":39,"forks_count":22,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-08-03T09:07:12.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"subtleGradient/slick","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mootools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-10-30T19:50:57.000Z","updated_at":"2024-07-26T03:06:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mootools/slick","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mootools%2Fslick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mootools%2Fslick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mootools%2Fslick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mootools%2Fslick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mootools","download_url":"https://codeload.github.com/mootools/slick/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224067049,"owners_count":17250102,"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-08-02T09:00:36.887Z","updated_at":"2024-11-11T07:31:18.229Z","avatar_url":"https://github.com/mootools.png","language":"HTML","readme":"(Slick is an official [MooTools](http://mootools.net) project)\n\nSlick\n=====\nA new standalone selector engine that is totally slick!\n-------------------------------------------------------\n\n### Create your own custom pseudo-classes!\nEver want to make your own `:my-widget(rocks)` pseudoclass? Now you can!\n\n### Use your own custom getAttribute code!\nEG: Use MooTool's Element.get method or jQuery's $.attr\n\n### Use your own parser!\nWant to support XPATH selectors? JSONPath selectors? Pre-cached JS Object selctors? Just swap out the default parser and make your own.\n\n### Use the parser by itself!\nWant to integrate a CSS3 Selector parser into your own app somehow? Use the slick selector CSS3 parser by itself and get a JS Object representation of your selector.\n\n---\n\nSlick Selector Engine\n=====================\n\nUsage\n-----\n\n### `search` context for selector\nSearch this context for any nodes that match this selector.\n\nExpects: \n* context: document or node or array of documents or nodes\n* selector: String or SelectorObject\n* (**optional**) append: Array or Object with a push method\n\nReturns: append argument or Array of 0 or more nodes\n\n\tSlick.search(document, \"#foo \u003e bar.baz\") → [\u003cbar\u003e, \u003cbar\u003e, \u003cbar\u003e]\n\tSlick.search([\u003col\u003e, \u003cul\u003e], \"li \u003e a\") → [\u003ca\u003e, \u003ca\u003e, \u003ca\u003e]\n\tSlick.search(document, \"#foo \u003e bar.baz\", { push:function(){} }) → { push:function(){}, 0:\u003cbar\u003e, 1:\u003cbar\u003e, 2:\u003cbar\u003e }\n\n\n### `find` first in context with selector or null\nFind the first node in document that matches selector or null if none are found.\n\nExpects:\n* context: document or node or array of documents or nodes\n* selector: String or SelectorObject\n\nReturns: Element or null\n\n\tSlick.find(document, \"#foo \u003e bar.baz\") → \u003cbar\u003e\n\tSlick.find(node, \"#does-not-exist\") → null\n\n\n### node `match` selector?\nDoes this node match this selector?\n\nExpects:\n* node\n* node, String or SelectorObject\n\nReturns: true or false\n\n\tSlick.match(\u003cdiv class=rocks\u003e, \"div.rocks\") → true\n\tSlick.match(\u003cdiv class=lame\u003e, \"div.rocks\") → false\n\tSlick.match(\u003cdiv class=lame\u003e, \u003cdiv class=rocks\u003e) → false\n\n\n### context `contains` node?\nDoes this context contain this node? Is the context a parent of this node?\n\nExpects:\n* context: document or node\n* node: node\n\nReturns: true or false\n\n\tSlick.contains(\u003cul\u003e, \u003cli\u003e) → true\n\tSlick.contains(\u003cbody\u003e, \u003chtml\u003e) → false\n\n\n---\n\n\nSlick CSS Selector Parser\n=========================\nParse a CSS selector string into a JavaScript object\n----------------------------------------------------\n\nUsage\n-----\n\n### `parse` selector into object\nParse a CSS Selector String into a Selector Object.\n\nExpects: String\n\nReturns: SelectorObject\n\n\tSlick.parse(\"#foo \u003e bar.baz\") → SelectorObject\n\n\nSelectorObject format\n---------------------\n\n### `#foo \u003e bar.baz`\n\n\t{\n\t\t\"raw\":\"#foo \u003e bar.baz\",\n\t\t\"expressions\": [[\n\t\t\t{ \"combinator\":\" \", \"tag\":\"*\", \"id\":\"foo\" },\n\t\t\t{ \"combinator\":\"\u003e\", \"tag\":\"bar\", \"classList\": [\"baz\"], \"classes\": [{\"value\":\"baz\", \"regexp\":RegExp }]}\n\t\t]]\n\t}\n\n### `h1, h2, ul \u003e li, .things`\n\n\t{\n\t\t\"raw\": \"h1, h2, ul \u003e li, .things\",\n\t\t\"expressions\": [\n\t\t\t[{ \"combinator\":\" \", \"tag\": \"h1\" }],\n\t\t\t[{ \"combinator\":\" \", \"tag\": \"h2\" }],\n\t\t\t[{ \"combinator\":\" \", \"tag\": \"ul\" }, { \"combinator\": \"\u003e\", \"tag\": \"li\" }],\n\t\t\t[{ \"combinator\":\" \", \"tag\": \"*\", \"classList\": [\"things\"], \"classes\": [{\"value\": \"things\", \"regexp\":RegExp }] }]\n\t\t]\n\t}\n","funding_links":[],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmootools%2Fslick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmootools%2Fslick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmootools%2Fslick/lists"}