common-callback-names
Advanced tools
Comparing version 1.0.2 to 2.0.0
@@ -0,3 +1,27 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
<a name="2.0.0"></a> | ||
# [2.0.0](https://github.com/tunnckocore/common-callback-names/compare/v1.0.2...v2.0.0) (2017-03-11) | ||
### Bug Fixes | ||
* **readme:** remove redundant API section ([57f90c1](https://github.com/tunnckocore/common-callback-names/commit/57f90c1)) | ||
### Code Refactoring | ||
* **simplify:** just export an array directly ([a3bde83](https://github.com/tunnckocore/common-callback-names/commit/a3bde83)) | ||
### BREAKING CHANGES | ||
* simplify: No more ./list.json file | ||
## 1.0.2 - 2016-03-18 | ||
@@ -4,0 +28,0 @@ - Release v1.0.2 / npm@v1.0.2 |
11
index.js
/*! | ||
* common-callback-names <https://github.com/tunnckoCore/common-callback-names> | ||
* | ||
* Copyright (c) 2016 Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk) | ||
* Copyright (c) Charlike Mike Reagent <@tunnckoCore> (https://i.am.charlike.online) | ||
* Released under the MIT license. | ||
@@ -10,2 +10,9 @@ */ | ||
module.exports = require('./list.json') | ||
module.exports = [ | ||
'callback', | ||
'callback_', | ||
'cb', | ||
'cb_', | ||
'done', | ||
'next' | ||
] |
{ | ||
"name": "common-callback-names", | ||
"version": "1.0.2", | ||
"version": "2.0.0", | ||
"description": "List of common callback names - callback, cb, callback_, next, done.", | ||
"repository": "tunnckoCore/common-callback-names", | ||
"author": "Charlike Mike Reagent <@tunnckoCore> (http://www.tunnckocore.tk)", | ||
"author": "Charlike Mike Reagent <@tunnckoCore> (https://i.am.charlike.online)", | ||
"precommit.silent": true, | ||
@@ -11,12 +11,26 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "standard && node test.js" | ||
"lint": "standard index.js test.js --fix --verbose", | ||
"test": "npm-run-all -s lint test:*", | ||
"test:api": "nyc --reporter lcov node test.js", | ||
"test:report": "nyc report", | ||
"prerelease": "npm test", | ||
"release": "standard-version --sign --no-verify", | ||
"git": "npm-run-all -s git:*", | ||
"git:add": "git add --all", | ||
"git:cz": "git-cz", | ||
"commit": "npm-run-all -s test git" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"assertit": "^0.1.0", | ||
"pre-commit": "*" | ||
"commitizen": "~2.7.0", | ||
"cz-conventional-changelog": "1.1.5", | ||
"mukla": "^0.4.8", | ||
"npm-run-all": "~3.1.2", | ||
"nyc": "^10.1.2", | ||
"pre-commit": "^1.2.2", | ||
"standard": "^9.0.0", | ||
"standard-version": "^4.0.0" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"list.json" | ||
"index.js" | ||
], | ||
@@ -34,5 +48,14 @@ "keywords": [ | ||
], | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"verb": { | ||
"run": true, | ||
"toc": false, | ||
"toc": { | ||
"render": true, | ||
"method": "preWrite", | ||
"maxdepth": 3 | ||
}, | ||
"layout": "empty", | ||
@@ -44,2 +67,5 @@ "tasks": [ | ||
"list": [ | ||
"always-done", | ||
"minibase", | ||
"try-catch-core", | ||
"function-arguments", | ||
@@ -50,5 +76,30 @@ "get-fn-name", | ||
"is-callback-function" | ||
] | ||
} | ||
], | ||
"highlight": "always-done" | ||
}, | ||
"lint": { | ||
"reflinks": true | ||
}, | ||
"reflinks": [ | ||
"always-done", | ||
"async-done", | ||
"base", | ||
"charlike", | ||
"commitizen", | ||
"common-callback-names", | ||
"dezalgo", | ||
"fn-name", | ||
"once", | ||
"standard-version", | ||
"verb", | ||
"verb-generate-readme" | ||
] | ||
}, | ||
"nyc": { | ||
"check-coverage": true, | ||
"statements": 100, | ||
"functions": 100, | ||
"branches": 100, | ||
"lines": 100 | ||
} | ||
} | ||
} |
160
README.md
@@ -1,17 +0,45 @@ | ||
# [common-callback-names][author-www-url] [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url] | ||
# common-callback-names [![NPM version](https://img.shields.io/npm/v/common-callback-names.svg?style=flat)](https://www.npmjs.com/package/common-callback-names) [![mit license][license-img]][license-url] [![NPM monthly downloads](https://img.shields.io/npm/dm/common-callback-names.svg?style=flat)](https://npmjs.org/package/common-callback-names) [![npm total downloads][downloads-img]][downloads-url] | ||
> List of common callback names - callback, cb, callback_, next, done. | ||
[![code climate][codeclimate-img]][codeclimate-url] [![standard code style][standard-img]][standard-url] [![travis build status][travis-img]][travis-url] [![coverage status][coveralls-img]][coveralls-url] [![dependency status][david-img]][david-url] | ||
[![code climate][codeclimate-img]][codeclimate-url] | ||
[![code style][standard-img]][standard-url] | ||
[![linux build][travis-img]][travis-url] | ||
[![windows build][appveyor-img]][appveyor-url] | ||
[![code coverage][coverage-img]][coverage-url] | ||
[![dependency status][david-img]][david-url] | ||
[![paypal donate][paypalme-img]][paypalme-url] | ||
You might also be interested in [always-done](https://github.com/hybridables/always-done#readme). | ||
## Table of Contents | ||
- [Install](#install) | ||
- [Usage](#usage) | ||
- [Related](#related) | ||
- [Contributing](#contributing) | ||
- [Building docs](#building-docs) | ||
- [Running tests](#running-tests) | ||
- [Author](#author) | ||
- [License](#license) | ||
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_ | ||
## Install | ||
Install with [npm](https://www.npmjs.com/) | ||
``` | ||
npm i common-callback-names --save | ||
$ npm install common-callback-names --save | ||
``` | ||
or install using [yarn](https://yarnpkg.com) | ||
``` | ||
$ yarn add common-callback-names | ||
``` | ||
## Usage | ||
> For more use-cases see the [tests](./test.js) | ||
> For more use-cases see the [tests](test.js) | ||
```js | ||
var commonCallbackNames = require('common-callback-names') | ||
const commonCallbackNames = require('common-callback-names') | ||
@@ -30,39 +58,76 @@ console.log(commonCallbackNames) | ||
### List | ||
> Some of them are used in node core. | ||
## Related | ||
- [always-done](https://www.npmjs.com/package/always-done): Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement… [more](https://github.com/hybridables/always-done#readme) | [homepage](https://github.com/hybridables/always-done#readme "Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement for [async-done][] - pass 100% of its tests plus more") | ||
- [function-arguments](https://www.npmjs.com/package/function-arguments): Get arguments of a function, useful for and used in dependency injectors. Works for regular functions, generator functions and arrow… [more](https://github.com/tunnckocore/function-arguments#readme) | [homepage](https://github.com/tunnckocore/function-arguments#readme "Get arguments of a function, useful for and used in dependency injectors. Works for regular functions, generator functions and arrow functions.") | ||
- [get-fn-name](https://www.npmjs.com/package/get-fn-name): Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded… [more](https://github.com/tunnckocore/get-fn-name#readme) | [homepage](https://github.com/tunnckocore/get-fn-name#readme "Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded functions. Powered by [fn-name][].") | ||
- [is-async-function](https://www.npmjs.com/package/is-async-function): Is function really asynchronous function? Trying to guess that based on check if [common-callback-names][] exists as function arguments names or… [more](https://github.com/tunnckocore/is-async-function#readme) | [homepage](https://github.com/tunnckocore/is-async-function#readme "Is function really asynchronous function? Trying to guess that based on check if [common-callback-names][] exists as function arguments names or you can pass your custom.") | ||
- [is-callback-function](https://www.npmjs.com/package/is-callback-function): Returns true if function is a callback. Checks its name is one of [common-callback-names][] - callback, cb, cb_, callback_, next… [more](https://github.com/tunnckocore/is-callback-function#readme) | [homepage](https://github.com/tunnckocore/is-callback-function#readme "Returns true if function is a callback. Checks its name is one of [common-callback-names][] - callback, cb, cb_, callback_, next, done, they can be customized, these are default.") | ||
- [minibase](https://www.npmjs.com/package/minibase): Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing… [more](https://github.com/node-minibase/minibase#readme) | [homepage](https://github.com/node-minibase/minibase#readme "Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing [base][] plugins.") | ||
- [parse-function](https://www.npmjs.com/package/parse-function): Parse a function into an object that has its name, body, args and a few more useful properties. | [homepage](https://github.com/tunnckocore/parse-function#readme "Parse a function into an object that has its name, body, args and a few more useful properties.") | ||
- [try-catch-core](https://www.npmjs.com/package/try-catch-core): Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and… [more](https://github.com/hybridables/try-catch-core#readme) | [homepage](https://github.com/hybridables/try-catch-core#readme "Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and used in higher-level libs such as [always-done][] to handle completion of anything.") | ||
**list.json** | ||
## Contributing | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/common-callback-names/issues/new). | ||
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards. | ||
If you need some help and can spent some cash, feel free to [contact me at CodeMentor.io](https://www.codementor.io/tunnckocore?utm_source=github&utm_medium=button&utm_term=tunnckocore&utm_campaign=github) too. | ||
```json | ||
[ | ||
"callback", | ||
"callback_", | ||
"cb", | ||
"cb_", | ||
"done", | ||
"next" | ||
] | ||
**In short:** If you want to contribute to that project, please follow these things | ||
1. Please DO NOT edit [README.md](README.md), [CHANGELOG.md](CHANGELOG.md) and [.verb.md](.verb.md) files. See ["Building docs"](#building-docs) section. | ||
2. Ensure anything is okey by installing the dependencies and run the tests. See ["Running tests"](#running-tests) section. | ||
3. Always use `npm run commit` to commit changes instead of `git commit`, because it is interactive and user-friendly. It uses [commitizen][] behind the scenes, which follows Conventional Changelog idealogy. | ||
4. Do NOT bump the version in package.json. For that we use `npm run release`, which is [standard-version][] and follows Conventional Changelog idealogy. | ||
Thanks a lot! :) | ||
## Building docs | ||
Documentation and that readme is generated using [verb-generate-readme][], which is a [verb][] generator, so you need to install both of them and then run `verb` command like that | ||
``` | ||
$ npm install verbose/verb#dev verb-generate-readme --global && verb | ||
``` | ||
## Related | ||
* [function-arguments](https://www.npmjs.com/package/function-arguments): Get arguments of a function, useful for and used in dependency injectors.… [more](https://www.npmjs.com/package/function-arguments) | [homepage](https://github.com/tunnckocore/function-arguments) | ||
* [get-fn-name](https://www.npmjs.com/package/get-fn-name): Get function name with strictness and correctness in mind. Also works for… [more](https://www.npmjs.com/package/get-fn-name) | [homepage](https://github.com/tunnckocore/get-fn-name) | ||
* [is-async-function](https://www.npmjs.com/package/is-async-function): Is function really asynchronous function? Trying to guess that based on… [more](https://www.npmjs.com/package/is-async-function) | [homepage](https://github.com/tunnckocore/is-async-function) | ||
* [is-callback-function](https://www.npmjs.com/package/is-callback-function): Returns true if function is a callback. Checks its name is one… [more](https://www.npmjs.com/package/is-callback-function) | [homepage](https://github.com/tunnckocore/is-callback-function) | ||
* [parse-function](https://www.npmjs.com/package/parse-function): Parse a function, arrow function or string to object with name, args,… [more](https://www.npmjs.com/package/parse-function) | [homepage](https://github.com/tunnckocore/parse-function) | ||
_Please don't edit the README directly. Any changes to the readme must be made in [.verb.md](.verb.md)._ | ||
## Contributing | ||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/common-callback-names/issues/new). | ||
But before doing anything, please read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines. | ||
## Running tests | ||
Clone repository and run the following in that cloned directory | ||
## [Charlike Make Reagent](http://j.mp/1stW47C) [![new message to charlike][new-message-img]][new-message-url] [![freenode #charlike][freenode-img]][freenode-url] | ||
``` | ||
$ npm install && npm test | ||
``` | ||
[![tunnckoCore.tk][author-www-img]][author-www-url] [![keybase tunnckoCore][keybase-img]][keybase-url] [![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url] | ||
## Author | ||
**Charlike Mike Reagent** | ||
[npmjs-url]: https://www.npmjs.com/package/common-callback-names | ||
[npmjs-img]: https://img.shields.io/npm/v/common-callback-names.svg?label=common-callback-names | ||
+ [github/tunnckoCore](https://github.com/tunnckoCore) | ||
+ [twitter/tunnckoCore](https://twitter.com/tunnckoCore) | ||
+ [codementor/tunnckoCore](https://codementor.io/tunnckoCore) | ||
[license-url]: https://github.com/tunnckoCore/common-callback-names/blob/master/LICENSE | ||
[license-img]: https://img.shields.io/badge/license-MIT-blue.svg | ||
## License | ||
Copyright © 2016-2017, [Charlike Mike Reagent](https://i.am.charlike.online). Released under the [MIT License](LICENSE). | ||
*** | ||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 11, 2017._ | ||
_Project scaffolded using [charlike][] cli._ | ||
[always-done]: https://github.com/hybridables/always-done | ||
[async-done]: https://github.com/gulpjs/async-done | ||
[base]: https://github.com/node-base/base | ||
[charlike]: https://github.com/tunnckocore/charlike | ||
[commitizen]: https://github.com/commitizen/cz-cli | ||
[common-callback-names]: https://github.com/tunnckocore/common-callback-names | ||
[dezalgo]: https://github.com/npm/dezalgo | ||
[fn-name]: https://github.com/sindresorhus/fn-name | ||
[once]: https://github.com/isaacs/once | ||
[standard-version]: https://github.com/conventional-changelog/standard-version | ||
[verb-generate-readme]: https://github.com/verbose/verb-generate-readme | ||
[verb]: https://github.com/verbose/verb | ||
[license-url]: https://www.npmjs.com/package/common-callback-names | ||
[license-img]: https://img.shields.io/npm/l/common-callback-names.svg | ||
[downloads-url]: https://www.npmjs.com/package/common-callback-names | ||
[downloads-img]: https://img.shields.io/npm/dt/common-callback-names.svg | ||
[codeclimate-url]: https://codeclimate.com/github/tunnckoCore/common-callback-names | ||
@@ -72,7 +137,10 @@ [codeclimate-img]: https://img.shields.io/codeclimate/github/tunnckoCore/common-callback-names.svg | ||
[travis-url]: https://travis-ci.org/tunnckoCore/common-callback-names | ||
[travis-img]: https://img.shields.io/travis/tunnckoCore/common-callback-names/master.svg | ||
[travis-img]: https://img.shields.io/travis/tunnckoCore/common-callback-names/master.svg?label=linux | ||
[coveralls-url]: https://coveralls.io/r/tunnckoCore/common-callback-names | ||
[coveralls-img]: https://img.shields.io/coveralls/tunnckoCore/common-callback-names.svg | ||
[appveyor-url]: https://ci.appveyor.com/project/tunnckoCore/common-callback-names | ||
[appveyor-img]: https://img.shields.io/appveyor/ci/tunnckoCore/common-callback-names/master.svg?label=windows | ||
[coverage-url]: https://codecov.io/gh/tunnckoCore/common-callback-names | ||
[coverage-img]: https://img.shields.io/codecov/c/github/tunnckoCore/common-callback-names/master.svg | ||
[david-url]: https://david-dm.org/tunnckoCore/common-callback-names | ||
@@ -84,22 +152,4 @@ [david-img]: https://img.shields.io/david/tunnckoCore/common-callback-names.svg | ||
[author-www-url]: http://www.tunnckocore.tk | ||
[author-www-img]: https://img.shields.io/badge/www-tunnckocore.tk-fe7d37.svg | ||
[paypalme-url]: https://www.paypal.me/tunnckoCore | ||
[paypalme-img]: https://img.shields.io/badge/paypal-donate-brightgreen.svg | ||
[keybase-url]: https://keybase.io/tunnckocore | ||
[keybase-img]: https://img.shields.io/badge/keybase-tunnckocore-8a7967.svg | ||
[author-npm-url]: https://www.npmjs.com/~tunnckocore | ||
[author-npm-img]: https://img.shields.io/badge/npm-~tunnckocore-cb3837.svg | ||
[author-twitter-url]: https://twitter.com/tunnckoCore | ||
[author-twitter-img]: https://img.shields.io/badge/twitter-@tunnckoCore-55acee.svg | ||
[author-github-url]: https://github.com/tunnckoCore | ||
[author-github-img]: https://img.shields.io/badge/github-@tunnckoCore-4183c4.svg | ||
[freenode-url]: http://webchat.freenode.net/?channels=charlike | ||
[freenode-img]: https://img.shields.io/badge/freenode-%23charlike-5654a4.svg | ||
[new-message-url]: https://github.com/tunnckoCore/ama | ||
[new-message-img]: https://img.shields.io/badge/ask%20me-anything-green.svg | ||
Sorry, the diff of this file is not supported yet
14647
153
8
5