mirror of https://github.com/qntm/fastjson
Compare commits
2 Commits
76ef8f869e
...
fa33744093
Author | SHA1 | Date |
---|---|---|
qntm | fa33744093 | |
qntm | b7a59f6df3 |
|
@ -0,0 +1,5 @@
|
|||
[*]
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
|
@ -41,3 +41,7 @@ $RECYCLE.BIN/
|
|||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# mine
|
||||
coverage
|
||||
node_modules
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- 10
|
||||
- 12
|
||||
- 14
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# CHANGELOG
|
||||
|
||||
## 2.x.x
|
||||
|
||||
Support for Node.js 0.10, 0.12, 4, 6, 8 and 10 is dropped.
|
||||
|
||||
## 1.x.x
|
||||
|
||||
Initial release.
|
6
index.js
6
index.js
|
@ -1,6 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
parse: function() { return null; },
|
||||
stringify: function() { return "null"; }
|
||||
};
|
|
@ -0,0 +1,17 @@
|
|||
module.exports = {
|
||||
verbose: true,
|
||||
bail: false,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: [
|
||||
'src/*.js',
|
||||
'!src/*.spec.js'
|
||||
],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
branches: 100,
|
||||
functions: 100,
|
||||
lines: 100,
|
||||
statements: 100
|
||||
}
|
||||
}
|
||||
}
|
40
package.json
40
package.json
|
@ -1,16 +1,28 @@
|
|||
{
|
||||
"name": "fastjson",
|
||||
"version": "1.0.2",
|
||||
"description": "A high-performance, standards-compliant JSON serialiser/deserialiser for JavaScript.",
|
||||
"homepage": "https://github.com/qntm/fastjson",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/qntm/fastjson.git"
|
||||
},
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
"json"
|
||||
],
|
||||
"author": "qntm",
|
||||
"license": "MIT"
|
||||
"name": "fastjson",
|
||||
"version": "2.0.1",
|
||||
"description": "A high-performance, standards-compliant JSON serialiser/deserialiser for JavaScript.",
|
||||
"homepage": "https://github.com/qntm/fastjson",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/qntm/fastjson.git"
|
||||
},
|
||||
"main": "src",
|
||||
"keywords": [
|
||||
"json"
|
||||
],
|
||||
"author": "qntm",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"postpublish": "npm version patch && git push",
|
||||
"pretest": "npx standard",
|
||||
"test": "npx jest"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest": "^26.6.3",
|
||||
"standard": "^16.0.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
parse: () => null,
|
||||
stringify: () => 'null'
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/* eslint-env jest */
|
||||
|
||||
const fastjson = require('.')
|
||||
|
||||
describe('fastjson', () => {
|
||||
describe('parse', () => {
|
||||
it('works', () => {
|
||||
expect(fastjson.parse('abdsfsal{}')).toBeNull()
|
||||
})
|
||||
})
|
||||
|
||||
describe('stringify', () => {
|
||||
it('works', () => {
|
||||
expect(fastjson.stringify('lm995')).toBe('null')
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue