Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinlei committed Dec 30, 2020
0 parents commit d4e43ef
Show file tree
Hide file tree
Showing 17 changed files with 756 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
node_modules
336 changes: 336 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "mini-cache",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"directories": {
"lib": "lib"
},
"scripts": {
"dev": "tsc -w"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"tslint": "^6.1.3",
"typescript": "^4.1.3"
}
}
7 changes: 7 additions & 0 deletions src/api/expires.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { createDecorator } from '../utils/utils'

export const expires = (t: number) => {
return (target: any, property: string) => {
createDecorator(target, property, 'expires', t)
}
}
8 changes: 8 additions & 0 deletions src/api/field.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { createDecorator } from '../utils/utils'

export const field = (key: string) => {
return (target: any, property: string) => {
createDecorator(target, property, 'key', key)
createDecorator(target, property, 'isField', true)
}
}
5 changes: 5 additions & 0 deletions src/api/storable.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { createDecorator } from '../utils/utils'

export const storable = (target: any, property: string) => {
createDecorator(target, property, 'storable', true)
}
Loading

0 comments on commit d4e43ef

Please sign in to comment.