From b7afe3e69df40b8b9d40ecbfb5f5474adcc94512 Mon Sep 17 00:00:00 2001 From: Niyaz Akhmetov Date: Sat, 15 Feb 2025 13:04:38 +0300 Subject: [PATCH] doc: replace `var` with `const` in examples --- Readme.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Readme.md b/Readme.md index 0db55e44..2c6227de 100644 --- a/Readme.md +++ b/Readme.md @@ -9,8 +9,8 @@ CSS parser / stringifier. ## Usage ```js -var css = require('css'); -var obj = css.parse('body { font-size: 12px; }', options); +const css = require('css'); +const obj = css.parse('body { font-size: 12px; }', options); css.stringify(obj, options); ``` @@ -46,11 +46,11 @@ Accepts an AST `object` (as `css.parse` produces) and returns a CSS string. ### Example ```js -var ast = css.parse('body { font-size: 12px; }', { source: 'source.css' }); +const ast = css.parse('body { font-size: 12px; }', { source: 'source.css' }); -var css = css.stringify(ast); +const css = css.stringify(ast); -var result = css.stringify(ast, { sourcemap: true }); +const result = css.stringify(ast, { sourcemap: true }); result.code // string with CSS result.map // source map object ```