postcss-selector-parser
> Selector parser with built in methods for working with selector strings.
Last updated a year ago by evilebottnawi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install postcss-selector-parser 
SYNC missed versions from official npm registry.

postcss-selector-parser test

Selector parser with built in methods for working with selector strings.

Install

With npm do:

npm install postcss-selector-parser

Quick Start

const parser = require('postcss-selector-parser');
const transform = selectors => {
    selectors.walk(selector => {
        // do something with the selector
        console.log(String(selector))
    });
};

const transformed = parser(transform).processSync('h1, h2, h3');

To normalize selector whitespace:

const parser = require('postcss-selector-parser');
const normalized = parser().processSync('h1, h2, h3', {lossless: false});
// -> h1,h2,h3

Async support is provided through parser.process and will resolve a Promise with the resulting selector string.

API

Please see API.md.

Credits

  • Huge thanks to Andrey Sitnik (@ai) for work on PostCSS which helped accelerate this module's development.

License

MIT

Current Tags

  • 6.0.15                                ...           latest (a year ago)
  • 5.0.0-rc.1                                ...           next (7 years ago)

55 Versions

  • 6.0.15                                ...           a year ago
  • 6.0.14                                ...           a year ago
  • 6.0.13                                ...           2 years ago
  • 6.0.12                                ...           2 years ago
  • 6.0.11                                ...           2 years ago
  • 6.0.10                                ...           3 years ago
  • 6.0.9                                ...           3 years ago
  • 6.0.8                                ...           3 years ago
  • 6.0.7                                ...           3 years ago
  • 6.0.6                                ...           4 years ago
  • 6.0.5                                ...           4 years ago
  • 6.0.4                                ...           4 years ago
  • 6.0.3                                ...           4 years ago
  • 3.1.2                                ...           5 years ago
  • 6.0.2                                ...           6 years ago
  • 6.0.1                                ...           6 years ago
  • 6.0.0                                ...           6 years ago
  • 5.0.0                                ...           6 years ago
  • 5.0.0-rc.4                                ...           6 years ago
  • 5.0.0-rc.3                                ...           7 years ago
  • 5.0.0-rc.2                                ...           7 years ago
  • 5.0.0-rc.1                                ...           7 years ago
  • 5.0.0-rc.0                                ...           7 years ago
  • 4.0.0                                ...           7 years ago
  • 4.0.0-rc.1                                ...           7 years ago
  • 4.0.0-rc.0                                ...           7 years ago
  • 3.1.1                                ...           7 years ago
  • 3.1.0                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 3.0.0-rc.0                                ...           7 years ago
  • 2.2.3                                ...           8 years ago
  • 2.2.2                                ...           8 years ago
  • 2.2.1                                ...           8 years ago
  • 2.2.0                                ...           8 years ago
  • 2.1.1                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.0                                ...           9 years ago
  • 1.3.3                                ...           9 years ago
  • 1.3.2                                ...           9 years ago
  • 1.3.1                                ...           9 years ago
  • 1.3.0                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.4                                ...           9 years ago
  • 1.1.3                                ...           9 years ago
  • 1.1.2                                ...           9 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.5                                ...           9 years ago
  • 0.0.4                                ...           9 years ago
  • 0.0.3                                ...           10 years ago
  • 0.0.2                                ...           10 years ago
  • 0.0.1                                ...           10 years ago

Copyright 2013 - present © cnpmjs.org | Home |