css-properties
Advanced tools
Comparing version
93
index.js
'use strict'; | ||
module.exports = function cssProperties(options) { | ||
return [ | ||
'background', | ||
'background-attachment', | ||
'background-color', | ||
'background-image', | ||
'background-position', | ||
'background-repeat', | ||
'border', | ||
'border-bottom', | ||
'border-bottom-color', | ||
'border-bottom-style', | ||
'border-bottom-width', | ||
'border-color', | ||
'border-left', | ||
'border-left-color', | ||
'border-left-style', | ||
'border-left-width', | ||
'border-right', | ||
'border-right-color', | ||
'border-right-style', | ||
'border-right-width', | ||
'border-style', | ||
'border-top', | ||
'border-top-color', | ||
'border-top-style', | ||
'border-top-width', | ||
'border-width', | ||
'clear', | ||
'clip', | ||
'color', | ||
'cursor', | ||
'display', | ||
'filter', | ||
'font', | ||
'font-family', | ||
'font-size', | ||
'font-variant', | ||
'font-weight', | ||
'height', | ||
'left', | ||
'letter-spacing', | ||
'line-height', | ||
'list-style', | ||
'list-style-image', | ||
'list-style-position', | ||
'list-style-type', | ||
'margin', | ||
'margin-bottom', | ||
'margin-left', | ||
'margin-right', | ||
'margin-top', | ||
'overflow', | ||
'padding', | ||
'padding-bottom', | ||
'padding-left', | ||
'padding-right', | ||
'padding-top', | ||
'page-break-after', | ||
'page-break-before', | ||
'position', | ||
'float', | ||
'text-align', | ||
'text-decoration', | ||
'text-decoration: blink', | ||
'text-decoration: line-through', | ||
'text-decoration: none', | ||
'text-decoration: overline', | ||
'text-decoration: underline', | ||
'text-indent', | ||
'text-transform', | ||
'top', | ||
'vertical-align', | ||
'visibility', | ||
'width', | ||
'z-index' | ||
]; | ||
} | ||
var buildProperties = require('./build'); | ||
var cssPropertiesJson = require('./w3c-css-properties'); | ||
module.exports = function cssProperties(refUrl, callback) { | ||
if (!callback && !refUrl) { | ||
return cssPropertiesJson.properties | ||
} | ||
return buildProperties(refUrl, callback) | ||
}; | ||
module.exports.json = function json() { | ||
return cssPropertiesJson; | ||
}; | ||
module.exports.api = buildProperties; |
{ | ||
"name": "css-properties", | ||
"description": "List of all CSS properties.", | ||
"description": "Get list of all available (possible) css properties from scraped directly from W3C website - returns array, have API and CLI", | ||
"author": "John Otander", | ||
"version": "0.0.1", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"version": "0.1.0", | ||
"scripts": { | ||
"test": "mocha test" | ||
"lint": "jshint index.js && jscs index.js --reporter inline", | ||
"test": "mocha", | ||
"test-cov": "istanbul cover _mocha", | ||
"test-travis": "istanbul cover _mocha --report lcovonly" | ||
}, | ||
@@ -19,3 +18,10 @@ "repository": { | ||
"css", | ||
"properties" | ||
"properties", | ||
"w3c", | ||
"scraped", | ||
"possible", | ||
"available", | ||
"api", | ||
"cli", | ||
"property" | ||
], | ||
@@ -27,6 +33,15 @@ "license": "MIT", | ||
"homepage": "https://github.com/johnotander/css-properties", | ||
"dependencies": {}, | ||
"dependencies": { | ||
"cheerio": "^0.18.0", | ||
"each-async": "^1.1.1", | ||
"got": "^2.3.1" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*" | ||
"istanbul-harmony": "^0.3.1", | ||
"mocha": "*", | ||
"mocha-lcov-reporter": "^0.0.1" | ||
}, | ||
"bin": { | ||
"css-properties": "./cli.js" | ||
} | ||
} |
@@ -5,3 +5,4 @@ # css-properties | ||
List of all CSS properties. | ||
Get list of all available (possible) CSS properties scraped directly from W3C website - returns an array. | ||
Also features an API and CLI. | ||
@@ -12,2 +13,3 @@ ## Installation | ||
npm install --save css-properties | ||
css-properties --help | ||
``` | ||
@@ -17,6 +19,17 @@ | ||
```javascript | ||
```js | ||
var cssProperties = require('css-properties'); | ||
cssProperties(); // => ['background', 'background-attachment', ...] | ||
cssProperties([refUrl[,callback]]); | ||
cssProperties(); // => ['background', 'background-attachment', ...] | ||
cssProperties.json(); // => {properties: ['background', 'background-attachment', ...]} | ||
cssProperties(function(err, res) { | ||
// assert.equal(err, null || undefined); | ||
// assert(res.length >= 178); | ||
console.log(res) | ||
// => ['background', 'background-attachment', ...] | ||
}); | ||
``` | ||
@@ -23,0 +36,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
12063
97.95%11
37.5%313
93.21%49
36.11%3
Infinity%3
200%2
Infinity%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added