Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ lib-cov
*.pid
*.gz
.*.swp
.idea
node_modules

pids
Expand Down
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
language: node_js
node_js:
- "0.10"
- "0.11"
- "node"
- "lts/*"
- "9"
- "8"
- "6"
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
var json_stringify = require('./lib/stringify.js').stringify;
var json_parse = require('./lib/parse.js');

module.exports = function(options) {
var newInstance = function(options) {
return {
parse: json_parse(options),
stringify: json_stringify
}
};

module.exports = newInstance;

//create the default method members with no options applied for backwards compatibility
module.exports.parse = json_parse();
module.exports.stringify = json_stringify;

// for cleaner typescript API
module.exports.newInstance = newInstance;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "json-bigint",
"version": "0.3.0",
"version": "0.3.1",
"description": "JSON.parse with bigints support",
"main": "index.js",
"scripts": {
Expand Down