Socket
Socket
Sign inDemoInstall

ast-contains-only-empty-space

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-contains-only-empty-space - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

15

changelog.md
# Change Log
All notable changes to this project will be documented in this file.

@@ -7,4 +8,16 @@

## [1.1.0] - 2018-05-01
### Added
* ✨ Set up [Prettier](https://prettier.io)
* ✨ Removed `package.lock` and `.editorconfig`
* ✨ Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — Rollup will remove them during the builds.
## 1.0.0 - 2018-03-10
### New
- First public release
* First public release
[1.1.0]: https://github.com/codsen/ast-contains-only-empty-space/compare/v1.0.0...v1.1.0

4

dist/ast-contains-only-empty-space.cjs.js

@@ -13,3 +13,3 @@ 'use strict';

function isStr(something) {
return typeof something === 'string';
return typeof something === "string";
}

@@ -26,3 +26,3 @@ var isArr = Array.isArray;

var current = val !== undefined ? val : key;
if (isStr(current) && trim(current) !== '') {
if (isStr(current) && trim(current) !== "") {
found = false;

@@ -29,0 +29,0 @@ }

@@ -9,3 +9,3 @@ import trim from 'lodash.trim';

function isStr(something) {
return typeof something === 'string';
return typeof something === "string";
}

@@ -22,3 +22,3 @@ var isArr = Array.isArray;

var current = val !== undefined ? val : key;
if (isStr(current) && trim(current) !== '') {
if (isStr(current) && trim(current) !== "") {
found = false;

@@ -25,0 +25,0 @@ }

{
"name": "ast-contains-only-empty-space",
"version": "1.0.2",
"version": "1.1.0",
"description": "Returns Boolean depending if passed AST contain only empty space",

@@ -30,4 +30,5 @@ "license": "MIT",

"coverage": "nyc report --reporter=text-lcov | coveralls",
"dev": "rollup -c -w",
"precommit": "npm test",
"dev": "rollup -c --dev --silent",
"format": "prettier '*.{js,ts,css,less,scss,vue,gql,md}' --write && ./node_modules/.bin/eslint src/*.js test/*.js --fix",
"precommit": "npm run format && npm test",
"prepare": "npm run build",

@@ -116,5 +117,20 @@ "pretest": "npm run build",

},
"files": {
"delete": [],
"write_hard": [
{
"contents": "",
"name": ""
}
],
"write_soft": [
{
"contents": "",
"name": ""
}
]
},
"header": {
"dontQuoteDescription": false,
"rightFloatedBadge": ""
"rightFloatedBadge": []
},

@@ -134,3 +150,4 @@ "licence": {

"label": ""
}
},
"devDependencies": []
}

@@ -144,15 +161,18 @@ },

"devDependencies": {
"ava": "*",
"babel-preset-env": "^1.6.1",
"coveralls": "*",
"eslint": "^4.18.2",
"eslint-config-airbnb-base": "^12.1.0",
"ava": "latest",
"babel-preset-env": "latest",
"coveralls": "latest",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-ava": "^4.5.1",
"eslint-plugin-import": "^2.9.0",
"husky": "*",
"nyc": "*",
"rollup": "^0.56.5",
"rollup-plugin-babel": "^3.0.3",
"rollup-plugin-commonjs": "^9.0.0",
"rollup-plugin-node-resolve": "^3.2.0",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-prettier": "^2.6.0",
"husky": "latest",
"nyc": "latest",
"prettier": "latest",
"rollup": "^0.58.2",
"rollup-plugin-babel": "^3.0.4",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-strip": "^1.1.1",
"rollup-plugin-uglify": "^3.0.0",

@@ -159,0 +179,0 @@ "uglify-es": "^3.3.9"

# ast-contains-only-empty-space
<a href="https://github.com/revelt/eslint-on-airbnb-base-badge" style="float: right; padding: 0 0 20px 20px;"><img src="https://cdn.rawgit.com/revelt/eslint-on-airbnb-base-badge/0c3e46c9/lint-badge.svg" alt="ESLint on airbnb-base with caveats" width="100" align="right"></a>
> Returns Boolean depending if passed AST contain only empty space
[![Minimum Node version required][node-img]][node-url]
[![Link to npm page][npm-img]][npm-url]
[![Build Status][travis-img]][travis-url]

@@ -18,2 +15,3 @@ [![Coverage][cov-img]][cov-url]

[![Test in browser][runkit-img]][runkit-url]
[![Code style: prettier][prettier-img]][prettier-url]
[![MIT License][license-img]][license-url]

@@ -23,2 +21,4 @@

<!-- prettier-ignore-start -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->

@@ -37,2 +37,4 @@ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

<!-- prettier-ignore-end -->
## Install

@@ -46,5 +48,5 @@

// consume via CommonJS require():
const containsOnlyEmptySpace = require('ast-contains-only-empty-space')
const containsOnlyEmptySpace = require("ast-contains-only-empty-space");
// or as an ES Module:
import containsOnlyEmptySpace from 'ast-contains-only-empty-space'
import containsOnlyEmptySpace from "ast-contains-only-empty-space";
```

@@ -54,7 +56,7 @@

Type | Key in `package.json` | Path | Size
----------------|-----------------------|-------|--------
Main export - **CommonJS version**, transpiled to ES5, contains `require` and `module.exports` | `main` | `dist/ast-contains-only-empty-space.cjs.js` | 917&nbsp;B
**ES module** build that Webpack/Rollup understands. Untranspiled ES6 code with `import`/`export`. | `module` | `dist/ast-contains-only-empty-space.esm.js` | 724&nbsp;B
**UMD build** for browsers, transpiled, minified, containing `iife`'s and has all dependencies baked-in | `browser` | `dist/ast-contains-only-empty-space.umd.js` | 13&nbsp;KB
| Type | Key in `package.json` | Path | Size |
| ------------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------------------- | ---------- |
| Main export - **CommonJS version**, transpiled to ES5, contains `require` and `module.exports` | `main` | `dist/ast-contains-only-empty-space.cjs.js` | 917&nbsp;B |
| **ES module** build that Webpack/Rollup understands. Untranspiled ES6 code with `import`/`export`. | `module` | `dist/ast-contains-only-empty-space.esm.js` | 724&nbsp;B |
| **UMD build** for browsers, transpiled, minified, containing `iife`'s and has all dependencies baked-in | `browser` | `dist/ast-contains-only-empty-space.umd.js` | 13&nbsp;KB |

@@ -127,3 +129,3 @@ **[⬆ &nbsp;back to top](#)**

```js
empty (input); // array, object or string — normally AST (which is array of nested objects/strings/arrays)
empty(input); // array, object or string — normally AST (which is array of nested objects/strings/arrays)
// => true/false

@@ -140,5 +142,5 @@ ```

* If you tried to use this library but it misbehaves, or **you need an advice setting it up**, and its readme doesn't make sense, just document it and raise an [issue on this repo](https://github.com/codsen/ast-contains-only-empty-space/issues).
* If you tried to use this library but it misbehaves, or **you need advice setting it up**, and its readme doesn't make sense, just document it and raise an [issue on this repo](https://github.com/codsen/ast-contains-only-empty-space/issues).
* If you would like to **add or change some features**, just fork it, hack away, and file a pull request. We'll do our best to merge it quickly. Code style is `airbnb-base`, only without semicolons. If you use a good code editor, it will pick up the established ESLint setup.
* If you would like to **add or change some features**, just fork it, hack away, and file a pull request. We'll do our best to merge it quickly. _Prettier_ is enabled, so you don't need to worry about the code style.

@@ -153,37 +155,25 @@ **[⬆ &nbsp;back to top](#)**

[node-img]: https://img.shields.io/node/v/ast-contains-only-empty-space.svg?style=flat-square&label=works%20on%20node
[node-url]: https://www.npmjs.com/package/ast-contains-only-empty-space
[npm-img]: https://img.shields.io/npm/v/ast-contains-only-empty-space.svg?style=flat-square&label=release
[npm-url]: https://www.npmjs.com/package/ast-contains-only-empty-space
[travis-img]: https://img.shields.io/travis/codsen/ast-contains-only-empty-space.svg?style=flat-square
[travis-url]: https://travis-ci.org/codsen/ast-contains-only-empty-space
[cov-img]: https://coveralls.io/repos/github/codsen/ast-contains-only-empty-space/badge.svg?style=flat-square?branch=master
[cov-url]: https://coveralls.io/github/codsen/ast-contains-only-empty-space?branch=master
[overall-img]: https://img.shields.io/bithound/code/github/codsen/ast-contains-only-empty-space.svg?style=flat-square
[overall-url]: https://www.bithound.io/github/codsen/ast-contains-only-empty-space
[deps-img]: https://img.shields.io/bithound/dependencies/github/codsen/ast-contains-only-empty-space.svg?style=flat-square
[deps-url]: https://www.bithound.io/github/codsen/ast-contains-only-empty-space/master/dependencies/npm
[deps2d-img]: https://img.shields.io/badge/deps%20in%202D-see_here-08f0fd.svg?style=flat-square
[deps2d-url]: http://npm.anvaka.com/#/view/2d/ast-contains-only-empty-space
[dev-img]: https://img.shields.io/bithound/devDependencies/github/codsen/ast-contains-only-empty-space.svg?style=flat-square
[dev-url]: https://www.bithound.io/github/codsen/ast-contains-only-empty-space/master/dependencies/npm
[vulnerabilities-img]: https://snyk.io/test/github/codsen/ast-contains-only-empty-space/badge.svg?style=flat-square
[vulnerabilities-url]: https://snyk.io/test/github/codsen/ast-contains-only-empty-space
[downloads-img]: https://img.shields.io/npm/dm/ast-contains-only-empty-space.svg?style=flat-square
[downloads-url]: https://npmcharts.com/compare/ast-contains-only-empty-space
[runkit-img]: https://img.shields.io/badge/runkit-test_in_browser-a853ff.svg?style=flat-square
[runkit-url]: https://npm.runkit.com/ast-contains-only-empty-space
[prettier-img]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
[prettier-url]: https://github.com/prettier/prettier
[license-img]: https://img.shields.io/npm/l/ast-contains-only-empty-space.svg?style=flat-square
[license-url]: https://github.com/codsen/ast-contains-only-empty-space/blob/master/license.md
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc