@csstools/cascade-layer-name-parser
Parse CSS Cascade Layer names.
Last updated 2 years ago by alaguna .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install @csstools/cascade-layer-name-parser 
SYNC missed versions from official npm registry.

Cascade Layer Name Parser

npm version Build Status Discord

Usage

Add Cascade Layer Name Parser to your project:

npm install @csstools/cascade-layer-name-parser @csstools/css-parser-algorithms @csstools/css-tokenizer --save-dev

Cascade Layer Name Parser depends on our CSS tokenizer and parser algorithms. It must be used together with @csstools/css-tokenizer and @csstools/css-parser-algorithms.

import { parse } from '@csstools/cascade-layer-name-parser';

const layerNames = parse('layer-name, foo.bar');
layerNames.forEach((layerName) => {
	console.log(layerName.name()) // "foo.bar"
	console.log(layerName.segments()) // ["foo", "bar"]
});

Current Tags

  • 1.0.7                                ...           latest (a year ago)

8 Versions

  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2013 - present © cnpmjs.org | Home |