aboutsummaryrefslogtreecommitdiff
path: root/node_modules/reduce-function-call/README.md
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:43:05 +0800
committerruki <waruqi@gmail.com>2018-11-07 22:18:30 +0800
commit89e95b3f143682ed9a006991bacf45c9dcba4818 (patch)
tree4f44cf41b828577d583890bdd5a1c31e8491a6ba /node_modules/reduce-function-call/README.md
parentaa7f0199255277949790b41c56e8ec97dd4f0da4 (diff)
downloadxmake-docs-vuepress.tar.gz
xmake-docs-vuepress.zip
remove node_modulesvuepress
Diffstat (limited to 'node_modules/reduce-function-call/README.md')
-rwxr-xr-xnode_modules/reduce-function-call/README.md71
1 files changed, 0 insertions, 71 deletions
diff --git a/node_modules/reduce-function-call/README.md b/node_modules/reduce-function-call/README.md
deleted file mode 100755
index cc3dac9a..00000000
--- a/node_modules/reduce-function-call/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# reduce-function-call [![Build Status](https://travis-ci.org/MoOx/reduce-function-call.png)](https://travis-ci.org/MoOx/reduce-function-call)
-
-> Reduce function calls in a string, using a callback
-
-## Installation
-
-```bash
-npm install reduce-function-call
-```
-
-## Usage
-
-```js
-var reduceFunctionCall = require("reduce-function-call")
-
-reduceFunctionCall("foo(1)", "foo", function(body) {
- // body === "1"
- return parseInt(body, 10) + 1
-})
-// "2"
-
-var nothingOrUpper = function(body, functionIdentifier) {
- // ignore empty value
- if (body === "") {
- return functionIdentifier + "()"
- }
-
- return body.toUpperCase()
-}
-
-reduceFunctionCall("bar()", "bar", nothingOrUpper)
-// "bar()"
-
-reduceFunctionCall("upper(baz)", "upper", nothingOrUpper)
-// "BAZ"
-
-reduceFunctionCall("math(math(2 + 2) * 4 + math(2 + 2)) and other things", "math", function(body, functionIdentifier, call) {
- try {
- return eval(body)
- }
- catch (e) {
- return call
- }
-})
-// "20 and other things"
-
-reduceFunctionCall("sha bla blah() blaa bla() abla() aabla() blaaa()", /\b([a-z]?bla[a-z]?)\(/, function(body, functionIdentifier) {
- if (functionIdentifier === "bla") {
- return "ABRACADABRA"
- }
- return functionIdentifier.replace("bla", "!")
-}
-// "sha bla !h blaa ABRACADABRA a! aabla() blaaa()"
-```
-
-See [unit tests](test/index.js) for others examples.
-
-## Contributing
-
-Work on a branch, install dev-dependencies, respect coding style & run tests before submitting a bug fix or a feature.
-
-```bash
-git clone https://github.com/MoOx/reduce-function-call.git
-git checkout -b patch-1
-npm install
-npm test
-```
-
-## [Changelog](CHANGELOG.md)
-
-## [License](LICENSE-MIT)