{"id":15965229,"url":"https://github.com/borodean/ruby-cssesc","last_synced_at":"2025-04-05T22:32:34.908Z","repository":{"id":12980579,"uuid":"15659322","full_name":"borodean/ruby-cssesc","owner":"borodean","description":"Ruby wrapper for a JavaScript library for escaping CSS strings and identifiers","archived":false,"fork":false,"pushed_at":"2020-02-22T03:28:16.000Z","size":2,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T15:10:12.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/borodean.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-01-05T21:46:13.000Z","updated_at":"2023-07-15T02:02:04.000Z","dependencies_parsed_at":"2022-07-21T12:48:16.565Z","dependency_job_id":null,"html_url":"https://github.com/borodean/ruby-cssesc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fruby-cssesc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fruby-cssesc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fruby-cssesc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fruby-cssesc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borodean","download_url":"https://codeload.github.com/borodean/ruby-cssesc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411236,"owners_count":20934650,"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-10-07T17:40:28.651Z","updated_at":"2025-04-05T22:32:34.873Z","avatar_url":"https://github.com/borodean.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ruby cssesc\n===========\n\nA Ruby wrapper for [cssesc][1], a JavaScript library for [escaping text for\nuse in CSS strings or identifiers][2].\n\n\nInstallation\n------------\n\n```bash\ngem install cssesc\n```\n\nAPI\n-----\n\n### `CSSEsc.escape(value, options = {})`\n\nThis function takes a value and returns an escaped version of the value where\nany characters that are not printable ASCII symbols are escaped using the\nshortest possible (but valid) [escape sequences for use in CSS strings or\nidentifiers][2].\n\n```ruby\nCSSEsc.escape('Ich ♥ Bücher')\n# =\u003e 'Ich \\\\2665  B\\\\FC cher'\n```\n\nBy default, `CSSEsc.escape` returns a string that can be used as part of a CSS\nstring. If the target is a CSS identifier rather than a CSS string, use the\n`is_identifier: true` setting.\n\nThe optional `options` arguments accepts a `Hash` with the exact [options\nwhich JavaScript version cssesc uses][3] only converted to the `snake_case`:\n\n```ruby\nCSSEsc.espace('123a2b', {\n  escape_everything: true\n})\n```\n\nDependencies\n------------\n\nThis library depends on the `cssesc-source` gem which is updated any time a\nnew version of cssesc is released. (The `cssesc-source` gem's version number\nis synced with each official cssesc release.)\n\n### ExecJS\n\nThe [ExecJS][4] library is used to automatically choose the best JavaScript\nengine for your platform. Check out its [README][5] for a complete list of\nsupported engines.\n\n[1]: http://github.com/mathiasbynens/cssesc\n[2]: http://mathiasbynens.be/notes/css-escapes\n[3]: http://github.com/mathiasbynens/cssesc#api\n[4]: http://github.com/sstephenson/execjs\n[5]: http://github.com/sstephenson/execjs/blob/master/README.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborodean%2Fruby-cssesc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborodean%2Fruby-cssesc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborodean%2Fruby-cssesc/lists"}