Skip to content

Commit

Permalink
update docs, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschlinkert committed Feb 25, 2017
1 parent 1956814 commit bc3cf69
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 95 deletions.
77 changes: 25 additions & 52 deletions .verb.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# {%= name %} {%= badge("fury") %} {%= badge("travis") %}

> {%= description %}
## Install
{%= include("install-npm", {save: true}) %}

## Usage

```js
Expand Down Expand Up @@ -41,11 +34,11 @@ isDescriptor(obj, 'bar');
`false` when not an object

```js
isDescriptor('a'))
isDescriptor('a');
//=> false
isDescriptor(null))
isDescriptor(null);
//=> false
isDescriptor([]))
isDescriptor([]);
//=> false
```

Expand All @@ -54,33 +47,33 @@ isDescriptor([]))
`true` when the object has valid properties with valid values.

```js
isDescriptor({value: 'foo'}))
isDescriptor({value: 'foo'});
//=> true
isDescriptor({value: noop}))
isDescriptor({value: noop});
//=> true
```

`false` when the object has invalid properties

```js
isDescriptor({value: 'foo', bar: 'baz'}))
isDescriptor({value: 'foo', bar: 'baz'});
//=> false
isDescriptor({value: 'foo', bar: 'baz'}))
isDescriptor({value: 'foo', bar: 'baz'});
//=> false
isDescriptor({value: 'foo', get: noop}))
isDescriptor({value: 'foo', get: noop});
//=> false
isDescriptor({get: noop, value: noop}))
isDescriptor({get: noop, value: noop});
//=> false
```

`false` when a value is not the correct type

```js
isDescriptor({value: 'foo', enumerable: 'foo'}))
isDescriptor({value: 'foo', enumerable: 'foo'});
//=> false
isDescriptor({value: 'foo', configurable: 'foo'}))
isDescriptor({value: 'foo', configurable: 'foo'});
//=> false
isDescriptor({value: 'foo', writable: 'foo'}))
isDescriptor({value: 'foo', writable: 'foo'});
//=> false
```

Expand All @@ -89,65 +82,45 @@ isDescriptor({value: 'foo', writable: 'foo'}))
`true` when the object has valid properties with valid values.

```js
isDescriptor({get: noop, set: noop}))
isDescriptor({get: noop, set: noop});
//=> true
isDescriptor({get: noop}))
isDescriptor({get: noop});
//=> true
isDescriptor({set: noop}))
isDescriptor({set: noop});
//=> true
```

`false` when the object has invalid properties

```js
isDescriptor({get: noop, set: noop, bar: 'baz'}))
isDescriptor({get: noop, set: noop, bar: 'baz'});
//=> false
isDescriptor({get: noop, writable: true}))
isDescriptor({get: noop, writable: true});
//=> false
isDescriptor({get: noop, value: true}))
isDescriptor({get: noop, value: true});
//=> false
```

`false` when an accessor is not a function

```js
isDescriptor({get: noop, set: 'baz'}))
isDescriptor({get: noop, set: 'baz'});
//=> false
isDescriptor({get: 'foo', set: noop}))
isDescriptor({get: 'foo', set: noop});
//=> false
isDescriptor({get: 'foo', bar: 'baz'}))
isDescriptor({get: 'foo', bar: 'baz'});
//=> false
isDescriptor({get: 'foo', set: 'baz'}))
isDescriptor({get: 'foo', set: 'baz'});
//=> false
```

`false` when a value is not the correct type

```js
isDescriptor({get: noop, set: noop, enumerable: 'foo'}))
isDescriptor({get: noop, set: noop, enumerable: 'foo'});
//=> false
isDescriptor({set: noop, configurable: 'foo'}))
isDescriptor({set: noop, configurable: 'foo'});
//=> false
isDescriptor({get: noop, configurable: 'foo'}))
isDescriptor({get: noop, configurable: 'foo'});
//=> false
```

## Related projects
{%= related(verb.related.list, {remove: name}) %}

## Running tests
{%= include("tests") %}

## Contributing
{%= include("contributing") %}

## Author
{%= include("author") %}

## License
{%= copyright() %}
{%= license %}

***

{%= include("footer") %}
105 changes: 63 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg)](https://www.npmjs.com/package/is-descriptor) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg)](https://travis-ci.org/jonschlinkert/is-descriptor)
# is-descriptor [![NPM version](https://img.shields.io/npm/v/is-descriptor.svg?style=flat)](https://www.npmjs.com/package/is-descriptor) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![NPM total downloads](https://img.shields.io/npm/dt/is-descriptor.svg?style=flat)](https://npmjs.org/package/is-descriptor) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-descriptor.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-descriptor)

> Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.
Expand All @@ -7,7 +7,7 @@
Install with [npm](https://www.npmjs.com/):

```sh
$ npm i is-descriptor --save
$ npm install --save is-descriptor
```

## Usage
Expand Down Expand Up @@ -46,11 +46,11 @@ isDescriptor(obj, 'bar');
`false` when not an object

```js
isDescriptor('a'))
isDescriptor('a');
//=> false
isDescriptor(null))
isDescriptor(null);
//=> false
isDescriptor([]))
isDescriptor([]);
//=> false
```

Expand All @@ -59,33 +59,33 @@ isDescriptor([]))
`true` when the object has valid properties with valid values.

```js
isDescriptor({value: 'foo'}))
isDescriptor({value: 'foo'});
//=> true
isDescriptor({value: noop}))
isDescriptor({value: noop});
//=> true
```

`false` when the object has invalid properties

```js
isDescriptor({value: 'foo', bar: 'baz'}))
isDescriptor({value: 'foo', bar: 'baz'});
//=> false
isDescriptor({value: 'foo', bar: 'baz'}))
isDescriptor({value: 'foo', bar: 'baz'});
//=> false
isDescriptor({value: 'foo', get: noop}))
isDescriptor({value: 'foo', get: noop});
//=> false
isDescriptor({get: noop, value: noop}))
isDescriptor({get: noop, value: noop});
//=> false
```

`false` when a value is not the correct type

```js
isDescriptor({value: 'foo', enumerable: 'foo'}))
isDescriptor({value: 'foo', enumerable: 'foo'});
//=> false
isDescriptor({value: 'foo', configurable: 'foo'}))
isDescriptor({value: 'foo', configurable: 'foo'});
//=> false
isDescriptor({value: 'foo', writable: 'foo'}))
isDescriptor({value: 'foo', writable: 'foo'});
//=> false
```

Expand All @@ -94,79 +94,100 @@ isDescriptor({value: 'foo', writable: 'foo'}))
`true` when the object has valid properties with valid values.

```js
isDescriptor({get: noop, set: noop}))
isDescriptor({get: noop, set: noop});
//=> true
isDescriptor({get: noop}))
isDescriptor({get: noop});
//=> true
isDescriptor({set: noop}))
isDescriptor({set: noop});
//=> true
```

`false` when the object has invalid properties

```js
isDescriptor({get: noop, set: noop, bar: 'baz'}))
isDescriptor({get: noop, set: noop, bar: 'baz'});
//=> false
isDescriptor({get: noop, writable: true}))
isDescriptor({get: noop, writable: true});
//=> false
isDescriptor({get: noop, value: true}))
isDescriptor({get: noop, value: true});
//=> false
```

`false` when an accessor is not a function

```js
isDescriptor({get: noop, set: 'baz'}))
isDescriptor({get: noop, set: 'baz'});
//=> false
isDescriptor({get: 'foo', set: noop}))
isDescriptor({get: 'foo', set: noop});
//=> false
isDescriptor({get: 'foo', bar: 'baz'}))
isDescriptor({get: 'foo', bar: 'baz'});
//=> false
isDescriptor({get: 'foo', set: 'baz'}))
isDescriptor({get: 'foo', set: 'baz'});
//=> false
```

`false` when a value is not the correct type

```js
isDescriptor({get: noop, set: noop, enumerable: 'foo'}))
isDescriptor({get: noop, set: noop, enumerable: 'foo'});
//=> false
isDescriptor({set: noop, configurable: 'foo'}))
isDescriptor({set: noop, configurable: 'foo'});
//=> false
isDescriptor({get: noop, configurable: 'foo'}))
isDescriptor({get: noop, configurable: 'foo'});
//=> false
```

## Related projects
## About

* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor)
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor)
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject)
### Related projects

## Running tests
* [is-accessor-descriptor](https://www.npmjs.com/package/is-accessor-descriptor): Returns true if a value has the characteristics of a valid JavaScript accessor descriptor. | [homepage](https://github.com/jonschlinkert/is-accessor-descriptor "Returns true if a value has the characteristics of a valid JavaScript accessor descriptor.")
* [is-data-descriptor](https://www.npmjs.com/package/is-data-descriptor): Returns true if a value has the characteristics of a valid JavaScript data descriptor. | [homepage](https://github.com/jonschlinkert/is-data-descriptor "Returns true if a value has the characteristics of a valid JavaScript data descriptor.")
* [is-descriptor](https://www.npmjs.com/package/is-descriptor): Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for… [more](https://github.com/jonschlinkert/is-descriptor) | [homepage](https://github.com/jonschlinkert/is-descriptor "Returns true if a value has the characteristics of a valid JavaScript descriptor. Works for data descriptors and accessor descriptors.")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")

Install dev dependencies:
### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Contributors

| **Commits** | **Contributor** |
| --- | --- |
| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [doowb](https://github.com/doowb) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |

### Building docs

_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_

To generate the readme, run the following command:

```sh
$ npm i -d && npm test
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```

## Contributing
### Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-descriptor/issues/new).
```sh
$ npm install && npm test
```

## Author
### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)

## License
### License

Copyright © 2015 [Jon Schlinkert](https://github.com/jonschlinkert)
Released under the MIT license.
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

***

_This file was generated by [verb](https://github.com/verbose/verb) on December 28, 2015._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 25, 2017._
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"lazy-cache": "^2.0.2"
},
"devDependencies": {
"gulp-format-md": "^0.1.11",
"mocha": "*"
},
"keywords": [
Expand Down Expand Up @@ -63,6 +64,14 @@
},
"plugins": [
"gulp-format-md"
]
],
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"lint": {
"reflinks": true
}
}
}

0 comments on commit bc3cf69

Please sign in to comment.