diff options
Diffstat (limited to 'node_modules/csso/lib/restructure/prepare/createDeclarationIndexer.js')
| -rw-r--r-- | node_modules/csso/lib/restructure/prepare/createDeclarationIndexer.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/node_modules/csso/lib/restructure/prepare/createDeclarationIndexer.js b/node_modules/csso/lib/restructure/prepare/createDeclarationIndexer.js deleted file mode 100644 index 227f8abf..00000000 --- a/node_modules/csso/lib/restructure/prepare/createDeclarationIndexer.js +++ /dev/null @@ -1,31 +0,0 @@ -import { generate } from 'css-tree'; - -class Index { - constructor() { - this.map = new Map(); - } - resolve(str) { - let index = this.map.get(str); - - if (index === undefined) { - index = this.map.size + 1; - this.map.set(str, index); - } - - return index; - } -}; - -export default function createDeclarationIndexer() { - const ids = new Index(); - - return function markDeclaration(node) { - const id = generate(node); - - node.id = ids.resolve(id); - node.length = id.length; - node.fingerprint = null; - - return node; - }; -}; |
