postcss-merge-idents 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.2
2
+
3
+ * Minor boost in performance with reduced stringify passes.
4
+
1
5
  # 1.0.1
2
6
 
3
7
  * Fixes an issue where duplicated keyframes with the same name would cause
package/index.js CHANGED
@@ -9,15 +9,15 @@ function canonical (obj) {
9
9
  return recurse(obj[key]);
10
10
  }
11
11
  return key;
12
- }
12
+ };
13
13
  }
14
14
 
15
15
  function mergeAtRules (css, atrule, declaration) {
16
16
  var cache = [], replacements = {};
17
17
  css.eachAtRule(atrule, function (rule) {
18
+ var toString = String(rule.nodes);
18
19
  var cached = cache.filter(function (c) {
19
- var sameContents = String(c.nodes) === String(rule.nodes);
20
- return sameContents && c.name === rule.name;
20
+ return String(c.nodes) === toString && c.name === rule.name;
21
21
  });
22
22
  if (cached.length) {
23
23
  replacements[cached[0].params] = rule.params;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-merge-idents",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Merge keyframe and counter style identifiers.",
5
5
  "main": "index.js",
6
6
  "scripts": {