Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 43d201a

Browse files
authored
Merge pull request #82 from groupon/dbushong/feature/master/types
add type declarations
2 parents 4470da6 + b7c596d commit 43d201a

File tree

12 files changed

+1355
-743
lines changed

12 files changed

+1355
-743
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tmp
2+
node_modules/
3+
.git

.eslintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": "groupon/node8",
3+
"overrides": [
4+
{
5+
"files": "*.mjs",
6+
"parserOptions": {
7+
"sourceType": "module"
8+
},
9+
"rules": {
10+
"node/no-unsupported-features": [
11+
"error",
12+
{
13+
"version": 8,
14+
"ignores": [
15+
"modules"
16+
]
17+
}
18+
]
19+
}
20+
},
21+
{
22+
"files": "*.test.js",
23+
"env": {
24+
"mocha": true
25+
}
26+
}
27+
]
28+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
node_modules/
33
npm-debug.log
44
/tmp
5+
/target

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
ignore-engines=true
12
registry=https://registry.npmjs.org

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
language: node_js
22
node_js:
3-
- 6.14.3
4-
- 8.11.3
5-
- 10.5.0
3+
- 8
4+
- 10
5+
- 12
66
deploy:
77
- provider: script
8-
script: ./node_modules/.bin/nlm release
8+
script: npx nlm release
99
skip_cleanup: true
1010
'on':
1111
branch: master
12-
node: 10.5.0
13-
before_install:
14-
- npm i -g npm@^6
12+
node: 12

lib/cson-parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ const stringify = require('./stringify');
3636
const parse = require('./parse');
3737

3838
module.exports = {
39-
stringify: stringify,
40-
parse: parse,
39+
stringify,
40+
parse,
4141
};

lib/typedefs.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export function stringify(
2+
data: any,
3+
visitor?: ((key: string, value: any) => any) | undefined | null,
4+
indent?: number | string
5+
): string;
6+
export function parse(
7+
text: string,
8+
reviver?: (key: string, value: any) => any
9+
): any;

0 commit comments

Comments
 (0)