{"id":25376793,"url":"https://github.com/terrierscript/sort-specificity","last_synced_at":"2025-04-09T10:33:43.019Z","repository":{"id":15499152,"uuid":"18233081","full_name":"terrierscript/sort-specificity","owner":"terrierscript","description":"Sort css selector for specificity","archived":false,"fork":false,"pushed_at":"2016-11-25T00:12:56.000Z","size":18,"stargazers_count":3,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-22T21:46:06.750Z","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/terrierscript.png","metadata":{"files":{"readme":"README.md","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":"2014-03-29T02:59:58.000Z","updated_at":"2016-12-03T07:25:35.000Z","dependencies_parsed_at":"2022-08-25T16:22:24.819Z","dependency_job_id":null,"html_url":"https://github.com/terrierscript/sort-specificity","commit_stats":null,"previous_names":["inuscript/sort-specificity"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fsort-specificity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fsort-specificity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fsort-specificity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/terrierscript%2Fsort-specificity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/terrierscript","download_url":"https://codeload.github.com/terrierscript/sort-specificity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226210,"owners_count":20904465,"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":"2025-02-15T04:39:31.936Z","updated_at":"2025-04-09T10:33:42.997Z","avatar_url":"https://github.com/terrierscript.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sort Specificity\n\nSort css selector for specificity\n\n\n[![NPM](https://nodei.co/npm/sort-specificity.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/sort-specificity/)\n[![npm version](https://badge.fury.io/js/sort-specificity.svg)](https://badge.fury.io/js/sort-specificity)\n[![Build Status](https://travis-ci.org/inuscript/sort-specificity.svg?branch=master)](https://travis-ci.org/inuscript/sort-specificity)\n\n\n\n## Instalation\n\n```sh\nnpm install sort-specificity\n```\n\n## Usage\n\n```js\nvar sortSpecificity = require('sort-specificity')\nvar input = [\n  \"a .d b#foo\",\n  \"b\",\n  \"a .d b.d\",\n  \"a b\",\n  \"a .d b\",\n]\nvar result = sortSpecificity(input)\n```\n\nresult is\n\n```js\n[\n  \"a .d b#foo\",\n  \"a .d b.d\",\n  \"a .d b\",\n  \"a b\",\n  \"b\"\n]\n```\n\n### Input raw css\nYou can input raw css.\n\n```js\nvar css = fs.readFileSync(\"./fixtures/sample.css\", \"utf-8\")\nvar result = sortSpecificity(css) // parsed css selctor\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fsort-specificity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrierscript%2Fsort-specificity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrierscript%2Fsort-specificity/lists"}