├── .editorconfig ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── funding.yml ├── index.js ├── license ├── package.json ├── readme.md ├── test.js └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: main 2 | on: 3 | - pull_request 4 | - push 5 | jobs: 6 | main: 7 | name: ${{matrix.node}} 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/checkout@v3 11 | - uses: actions/setup-node@v3 12 | with: 13 | node-version: ${{matrix.node}} 14 | - run: npm install 15 | - run: npm test 16 | - uses: codecov/codecov-action@v1 17 | strategy: 18 | matrix: 19 | node: 20 | - lts/hydrogen 21 | - node 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | node_modules/ 3 | *.d.ts 4 | *.log 5 | .DS_Store 6 | yarn.lock 7 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | coverage/ 2 | *.md 3 | -------------------------------------------------------------------------------- /funding.yml: -------------------------------------------------------------------------------- 1 | github: wooorm 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * List of vendor prefixes 3 | * 4 | * @type {string[]} 5 | */ 6 | export const vendors = [ 7 | 'ah', 8 | 'apple', 9 | 'atsc', 10 | 'epub', 11 | 'hp', 12 | 'khtml', 13 | 'moz', 14 | 'ms', 15 | 'o', 16 | 'rim', 17 | 'ro', 18 | 'tc', 19 | 'wap', 20 | 'webkit', 21 | 'xv' 22 | ] 23 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2016 Titus Wormer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vendors", 3 | "version": "2.0.1", 4 | "description": "List of vendor prefixes known to the web platform", 5 | "license": "MIT", 6 | "keywords": [ 7 | "css", 8 | "html", 9 | "dom", 10 | "web", 11 | "platform", 12 | "vendor", 13 | "prefix", 14 | "prefixes" 15 | ], 16 | "repository": "wooorm/vendors", 17 | "bugs": "https://github.com/wooorm/vendors/issues", 18 | "funding": { 19 | "type": "github", 20 | "url": "https://github.com/sponsors/wooorm" 21 | }, 22 | "author": "Titus Wormer (https://wooorm.com)", 23 | "contributors": [ 24 | "Titus Wormer (https://wooorm.com)" 25 | ], 26 | "sideEffects": false, 27 | "type": "module", 28 | "main": "index.js", 29 | "types": "index.d.ts", 30 | "files": [ 31 | "index.d.ts", 32 | "index.js" 33 | ], 34 | "devDependencies": { 35 | "@types/node": "^18.0.0", 36 | "c8": "^7.0.0", 37 | "prettier": "^2.0.0", 38 | "remark-cli": "^11.0.0", 39 | "remark-preset-wooorm": "^9.0.0", 40 | "type-coverage": "^2.0.0", 41 | "typescript": "^4.0.0", 42 | "xo": "^0.52.0" 43 | }, 44 | "scripts": { 45 | "prepack": "npm run build && npm run format", 46 | "build": "tsc --build --clean && tsc --build && type-coverage", 47 | "format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix", 48 | "test-api": "node --conditions development test.js", 49 | "test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api", 50 | "test": "npm run build && npm run format && npm run test-coverage" 51 | }, 52 | "prettier": { 53 | "tabWidth": 2, 54 | "useTabs": false, 55 | "singleQuote": true, 56 | "bracketSpacing": false, 57 | "semi": false, 58 | "trailingComma": "none" 59 | }, 60 | "xo": { 61 | "prettier": true 62 | }, 63 | "remarkConfig": { 64 | "plugins": [ 65 | "preset-wooorm" 66 | ] 67 | }, 68 | "typeCoverage": { 69 | "atLeast": 100, 70 | "detail": true, 71 | "strict": true, 72 | "ignoreCatch": true 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # vendors 2 | 3 | [![Build][build-badge]][build] 4 | [![Coverage][coverage-badge]][coverage] 5 | [![Downloads][downloads-badge]][downloads] 6 | [![Size][size-badge]][size] 7 | 8 | List of vendor prefixes. 9 | 10 | ## Contents 11 | 12 | * [What is this?](#what-is-this) 13 | * [When should I use this?](#when-should-i-use-this) 14 | * [Install](#install) 15 | * [Use](#use) 16 | * [API](#api) 17 | * [`vendors`](#vendors-1) 18 | * [Types](#types) 19 | * [Compatibility](#compatibility) 20 | * [Security](#security) 21 | * [Contribute](#contribute) 22 | * [License](#license) 23 | 24 | ## What is this? 25 | 26 | This is a little list of real (as in, `mso-` and `prince-` are not included 27 | because they are not valid) vendor prefixes known to the web platform. 28 | From [Wikipedia][wiki] and the [CSS 2.1 spec][spec]. 29 | 30 | ## When should I use this? 31 | 32 | You can use this package if you’re dealing with parsing and transforming CSS and 33 | you don’t want to copy/paste these prefixes into each project. 34 | 35 | ## Install 36 | 37 | This package is [ESM only][esm]. 38 | In Node.js (version 14.14+, 16.0+), install with [npm][]: 39 | 40 | ```sh 41 | npm install vendors 42 | ``` 43 | 44 | In Deno with [`esm.sh`][esmsh]: 45 | 46 | ```js 47 | import {vendors} from 'https://esm.sh/vendors@2' 48 | ``` 49 | 50 | In browsers with [`esm.sh`][esmsh]: 51 | 52 | ```html 53 | 56 | ``` 57 | 58 | ## Use 59 | 60 | ```js 61 | import {vendors} from 'vendors' 62 | 63 | console.log(vendors) 64 | ``` 65 | 66 | Yields: 67 | 68 | ```js 69 | [ 70 | 'ah', 71 | 'apple', 72 | 'atsc', 73 | 'epub', 74 | 'hp', 75 | 'khtml', 76 | 'moz', 77 | 'ms', 78 | 'o', 79 | 'rim', 80 | 'ro', 81 | 'tc', 82 | 'wap', 83 | 'webkit', 84 | 'xv' 85 | ] 86 | ``` 87 | 88 | ## API 89 | 90 | This package exports the identifier `vendors`. 91 | There is no default export. 92 | 93 | ### `vendors` 94 | 95 | List of vendor prefixes (`string[]`). 96 | 97 | ## Types 98 | 99 | This package is fully typed with [TypeScript][]. 100 | It exports no additional types. 101 | 102 | ## Compatibility 103 | 104 | This package is at least compatible with all maintained versions of Node.js. 105 | As of now, that is Node.js 14.14+ and 16.0+. 106 | It also works in Deno and modern browsers. 107 | 108 | ## Security 109 | 110 | This package is safe. 111 | 112 | ## Contribute 113 | 114 | Yes please! 115 | See [How to Contribute to Open Source][contribute]. 116 | 117 | ## License 118 | 119 | [MIT][license] © [Titus Wormer][author] 120 | 121 | 122 | 123 | [build-badge]: https://github.com/wooorm/vendors/workflows/main/badge.svg 124 | 125 | [build]: https://github.com/wooorm/vendors/actions 126 | 127 | [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/vendors.svg 128 | 129 | [coverage]: https://codecov.io/github/wooorm/vendors 130 | 131 | [downloads-badge]: https://img.shields.io/npm/dm/vendors.svg 132 | 133 | [downloads]: https://www.npmjs.com/package/vendors 134 | 135 | [size-badge]: https://img.shields.io/bundlephobia/minzip/vendors.svg 136 | 137 | [size]: https://bundlephobia.com/result?p=vendors 138 | 139 | [npm]: https://docs.npmjs.com/cli/install 140 | 141 | [esmsh]: https://esm.sh 142 | 143 | [license]: license 144 | 145 | [author]: https://wooorm.com 146 | 147 | [esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c 148 | 149 | [typescript]: https://www.typescriptlang.org 150 | 151 | [contribute]: https://opensource.guide/how-to-contribute/ 152 | 153 | [wiki]: https://en.wikipedia.org/wiki/CSS_hack#Browser_prefixes 154 | 155 | [spec]: https://www.w3.org/TR/CSS22/syndata.html#vendor-keyword-history 156 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import assert from 'node:assert/strict' 2 | import test from 'node:test' 3 | import {vendors} from './index.js' 4 | 5 | test('vendors', function () { 6 | let index = -1 7 | 8 | assert.ok(Array.isArray(vendors), 'should be an `array`') 9 | 10 | while (++index < vendors.length) { 11 | assert.equal( 12 | typeof vendors[index], 13 | 'string', 14 | '`' + vendors[index] + '` should be a string' 15 | ) 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["**/**.js"], 3 | "exclude": ["coverage", "node_modules"], 4 | "compilerOptions": { 5 | "checkJs": true, 6 | "declaration": true, 7 | "emitDeclarationOnly": true, 8 | "exactOptionalPropertyTypes": true, 9 | "forceConsistentCasingInFileNames": true, 10 | "lib": ["es2020"], 11 | "module": "node16", 12 | "newLine": "lf", 13 | "skipLibCheck": true, 14 | "strict": true, 15 | "target": "es2020" 16 | } 17 | } 18 | --------------------------------------------------------------------------------