Compare commits

...

2 Commits

Author SHA1 Message Date
qntm fa33744093 2.0.1 2021-01-03 03:15:14 +00:00
qntm b7a59f6df3
Drop support for some Node.js versions (#9)
* Test in all Node.js versions ever ever

* ??

* Or this maybe

* Oof

* Phew
2021-01-03 03:14:32 +00:00
9 changed files with 82 additions and 21 deletions

5
.editorconfig Normal file
View File

@ -0,0 +1,5 @@
[*]
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2

4
.gitignore vendored
View File

@ -41,3 +41,7 @@ $RECYCLE.BIN/
Network Trash Folder
Temporary Items
.apdisk
# mine
coverage
node_modules

View File

@ -1,5 +1,4 @@
language: node_js
node_js:
- 10
- 12
- 14

9
CHANGELOG.md Normal file
View File

@ -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.

View File

@ -1,6 +0,0 @@
"use strict";
module.exports = {
parse: function() { return null; },
stringify: function() { return "null"; }
};

17
jest.config.js Normal file
View File

@ -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
}
}
}

View File

@ -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"
}
}

4
src/index.js Normal file
View File

@ -0,0 +1,4 @@
module.exports = {
parse: () => null,
stringify: () => 'null'
}

17
src/index.spec.js Normal file
View File

@ -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')
})
})
})