hyphenate-style-name
Advanced tools
Comparing version 1.0.1 to 1.0.2
11
index.js
@@ -5,10 +5,13 @@ 'use strict'; | ||
var msPattern = /^ms-/; | ||
var cache = {}; | ||
function hyphenateStyleName(string) { | ||
return string | ||
.replace(uppercasePattern, '-$&') | ||
.toLowerCase() | ||
.replace(msPattern, '-ms-'); | ||
return string in cache | ||
? cache[string] | ||
: cache[string] = string | ||
.replace(uppercasePattern, '-$&') | ||
.toLowerCase() | ||
.replace(msPattern, '-ms-'); | ||
} | ||
module.exports = hyphenateStyleName; |
{ | ||
"name": "hyphenate-style-name", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Hyphenates a camelcased CSS property name", | ||
"main": "index.js", | ||
"scripts": { | ||
"coverage": "istanbul cover tape -- test/**/*.test.js", | ||
"coverage": "nyc tape -- test/**/*.test.js", | ||
"lint": "eslint .", | ||
@@ -29,7 +29,7 @@ "test": "tape test/**/*.test.js", | ||
"devDependencies": { | ||
"eslint": "^1.0.0", | ||
"eslint-config-vaffel": "^1.0.2", | ||
"istanbul": "^0.3.17", | ||
"tape": "^4.0.1" | ||
"eslint": "^3.8.1", | ||
"eslint-config-vaffel": "^5.0.0", | ||
"nyc": "^8.3.2", | ||
"tape": "^4.6.2" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
69201
7
13
0