forked from lisaogren/axios-cache-adapter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f8721dc
Showing
9 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"presets": [ | ||
"es2015" | ||
], | ||
"plugins": [ | ||
"transform-es2015-arrow-functions", | ||
"add-module-exports" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
coverage | ||
dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language: node_js | ||
node_js: | ||
- v5 | ||
- v4 | ||
- '0.12' | ||
- '0.10' | ||
before_install: | ||
- 'npm install codecov.io' | ||
before_script: | ||
- 'npm run lint' | ||
script: | ||
- 'npm run build' | ||
after_script: | ||
- 'npm run codecov' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Stéphane Bachelier <[email protected]> (https://github.com/stephanebachelier) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
|
||
# superapi-cache | ||
[![NPM version][npm-image]][npm-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![Codecov Status][codecov-image]][codecov-url] | ||
|
||
> Caching module for superapi | ||
## Install | ||
|
||
```sh | ||
npm install --save superapi-cache | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
import superapiCache from "superapi-cache" | ||
|
||
superapiCache() | ||
``` | ||
|
||
## License | ||
|
||
MIT © [Stéphane Bachelier](https://github.com/stephanebachelier) | ||
|
||
[npm-url]: https://npmjs.org/package/superapi-cache | ||
[npm-image]: https://img.shields.io/npm/v/superapi-cache.svg?style=flat | ||
|
||
[travis-url]: https://travis-ci.org/stephanebachelier/superapi-cache | ||
[travis-image]: https://img.shields.io/travis/stephanebachelier/superapi-cache.svg?style=flat | ||
|
||
[codecov-url]: https://codecov.io/github/stephanebachelier/superapi-cache | ||
[codecov-image]: https://img.shields.io/codecov/c/github/stephanebachelier/superapi-cache.svg?style=flat | ||
|
||
[depstat-url]: https://david-dm.org/stephanebachelier/superapi-cache | ||
[depstat-image]: https://david-dm.org/stephanebachelier/superapi-cache.svg?style=flat | ||
[download-badge]: http://img.shields.io/npm/dm/superapi-cache.svg?style=flat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
'use strict' | ||
|
||
export default awesome => { | ||
return `everything is ${awesome}` | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "superapi-cache", | ||
"version": "0.0.0", | ||
"description": "Caching module for superapi", | ||
"homepage": "https://github.com/stephanebachelier/superapi-cache", | ||
"author": { | ||
"name": "Stéphane Bachelier", | ||
"email": "[email protected]", | ||
"url": "https://github.com/stephanebachelier" | ||
}, | ||
"files": [ | ||
"/dist", | ||
"/lib" | ||
], | ||
"main": "dist/index.js", | ||
"jsnext:main": "lib/index.js", | ||
"keywords": [ | ||
"superapi", | ||
"cache", | ||
"xhr", | ||
"request" | ||
], | ||
"standard": { | ||
"ignore": [ | ||
"/dist" | ||
] | ||
}, | ||
"scripts": { | ||
"clean": "rimraf dist", | ||
"lint": "standard", | ||
"codecov": "npm run test:coverage -s && codecov < coverage/lcov.info", | ||
"test": "babel-tape-runner test/**.js | tap-spec", | ||
"test:coverage": "babel-node node_modules/.bin/isparta cover test/", | ||
"test:watch": "watch 'npm test' test lib", | ||
"prebuild": "npm run clean -s", | ||
"build": "babel lib --out-dir dist", | ||
"build:watch": "watch 'npm run build' lib", | ||
"preversion": "npm run lint -s && npm run test -s && npm run build -s", | ||
"postversion": "git push origin master --follow-tags", | ||
"deploy": "git pull --rebase origin master && git push origin master" | ||
}, | ||
"repository": "https://github.com/stephanebachelier/superapi-cache", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"babel-cli": "^6.3.17", | ||
"babel-core": "^6.3.26", | ||
"babel-plugin-add-module-exports": "^0.1.2", | ||
"babel-plugin-transform-es2015-arrow-functions": "^6.3.13", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-tape-runner": "^2.0.0", | ||
"isparta": "^4.0.0", | ||
"rimraf": "^2.5.0", | ||
"standard": "^5.4.1", | ||
"tap-spec": "^4.1.1", | ||
"tape": "^4.3.0", | ||
"watch": "^0.17.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
'use strict' | ||
|
||
import superapiCache from '../lib/index.js' | ||
import test from 'tape' | ||
|
||
test('awesome:test', t => { | ||
const message = 'everything is awesome' | ||
t.equals(superapiCache('awesome'), message, message) | ||
t.end() | ||
}) | ||
|