-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 87d7b29
Showing
24 changed files
with
528 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "notninja/es8", | ||
"env": { | ||
"node": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test/ | ||
.* | ||
AUTHORS.md | ||
CONTRIBUTING.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "8" | ||
script: | ||
- npm test | ||
notifications: | ||
slack: | ||
rooms: | ||
- secure: Bu+WX8d4eWg+hubGeMZQ5j/mdt0LmRbohp3NO9DQGi2/026Z7N/tGkienEaD8oOQY3ZORaQuGbMCLBHrMWUIAz8kaeMqtvRjj3a8ZGNVZ/2kFLwv2gQnMGkigULZNbDFKRd6I7WkEfOUU4ANsXNDzsfdM3h2jXbIGew922adF0GkQGm8npLAfshj32Mogwe1oU78pVFukW8TcWrL2iZDRaBk2mrPYfTyP3scbdYeOIDDgWvnV0DkXHP2oPI9mMjzuIOBEXF5cBv7wMMHOu1/dtZzN/zrMB1Hm0iFsdb2TT8NgpTjaxb3y0JuEgC+e1TB6VznZ53HwED5G4eDBFE7Nz4iJ1y4rMTOzDxqMhXPOgwD4DOg2JDgZeT3bm1De63fpeM7vbfuZnGAnm5u9NR2ylVcH0yCCfdH0WV0nhA+k384MQH/WJe1xerrIu7kMOh6VyM7BxgDvpROn3vWrkWfPWufXeyX8ZSaA2j0OcYpQ4nfF2dhsmCEMeKhNU5AgdJhCVa97STsLz8lH9RMSrYz95HH/y6Yz3YZ6te+lCZLokNjo3vO89+hoUHCe5obxwxD9zLWsBhtxtKKgzLGn45JSZOA5zr3QNhQlzw8FkDBrVyLlYKUoP2+kW8eZpTM0udRClSrquXf1Kf0pbReKHemrK73arSMesd/FAjM8hRCtIA= | ||
on_success: change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Authors ordered by first contribution | ||
|
||
* Alasdair Mercer <mercer.alasdair@gmail.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Contributing | ||
|
||
If you have any questions about [node-native2ascii](https://github.com/NotNinja/node-native2ascii) please feel free to | ||
[raise an issue](https://github.com/NotNinja/node-native2ascii/issues/new). | ||
|
||
Please [search existing issues](https://github.com/NotNinja/node-native2ascii/issues) for the same feature and/or issue | ||
before raising a new issue. Commenting on an existing issue is usually preferred over raising duplicate issues. | ||
|
||
Please ensure that all files conform to the coding standards, using the same coding style as the rest of the code base. | ||
All unit tests should be updated and passing as well. All of this can easily be checked via command-line: | ||
|
||
``` bash | ||
# install/update package dependencies | ||
$ npm install | ||
# run test suite | ||
$ npm test | ||
``` | ||
|
||
You must have at least [Node.js](https://nodejs.org) version 8 or newer installed. | ||
|
||
All pull requests should be made to the `develop` branch. | ||
|
||
Don't forget to add your details to the list of | ||
[AUTHORS.md](https://github.com/NotNinja/node-native2ascii/blob/master/AUTHORS.md) if you want your contribution to be | ||
recognized by others. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright (C) 2017 Alasdair Mercer, !ninja | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
888 d8b .d8888b. d8b d8b | ||
888 Y8P d88P Y88b Y8P Y8P | ||
888 888 | ||
88888b. 8888b. 888888 888 888 888 .d88b. .d88P 8888b. .d8888b .d8888b 888 888 | ||
888 "88b "88b 888 888 888 888 d8P Y8b .od888P" "88b 88K d88P" 888 888 | ||
888 888 .d888888 888 888 Y88 88P 88888888 d88P" .d888888 "Y8888b. 888 888 888 | ||
888 888 888 888 Y88b. 888 Y8bd8P Y8b. 888" 888 888 X88 Y88b. 888 888 | ||
888 888 "Y888888 "Y888 888 Y88P "Y8888 888888888 "Y888888 88888P' "Y8888P 888 888 | ||
|
||
[node-native2ascii](https://github.com/NotNinja/node-native2ascii) is a [Node.js](https://nodejs.org) implementation of | ||
Java's Native-to-ASCII Converter. | ||
|
||
[![Build Status](https://img.shields.io/travis/NotNinja/node-native2ascii/develop.svg?style=flat-square)](https://travis-ci.org/NotNinja/node-native2ascii) | ||
[![Dependency Status](https://img.shields.io/david/NotNinja/node-native2ascii.svg?style=flat-square)](https://david-dm.org/NotNinja/node-native2ascii) | ||
[![Dev Dependency Status](https://img.shields.io/david/dev/NotNinja/node-native2ascii.svg?style=flat-square)](https://david-dm.org/NotNinja/node-native2ascii?type=dev) | ||
[![License](https://img.shields.io/npm/l/node-native2ascii.svg?style=flat-square)](https://github.com/NotNinja/node-native2ascii/blob/master/LICENSE.md) | ||
[![Release](https://img.shields.io/npm/v/node-native2ascii.svg?style=flat-square)](https://www.npmjs.com/package/node-native2ascii) | ||
|
||
* [Install](#install) | ||
* [CLI](#cli) | ||
* [API](#api) | ||
* [Bugs](#bugs) | ||
* [Contributors](#contributors) | ||
* [License](#license) | ||
|
||
## Install | ||
|
||
Install using `npm`: | ||
|
||
``` bash | ||
$ npm install --save node-native2ascii | ||
``` | ||
|
||
You'll need to have at least [Node.js](https://nodejs.org) 8 or newer. | ||
|
||
If you want to use the command line interface you'll most likely want to install it globally so that you can run | ||
`native2ascii` from anywhere: | ||
|
||
``` bash | ||
$ npm install --global node-native2ascii | ||
``` | ||
|
||
## CLI | ||
|
||
TODO: Document CLI | ||
|
||
## API | ||
|
||
TODO: Document API | ||
|
||
## Bugs | ||
|
||
If you have any problems with node-native2ascii or would like to see changes currently in development you can do so | ||
[here](https://github.com/NotNinja/node-native2ascii/issues). | ||
|
||
## Contributors | ||
|
||
If you want to contribute, you're a legend! Information on how you can do so can be found in | ||
[CONTRIBUTING.md](https://github.com/NotNinja/node-native2ascii/blob/master/CONTRIBUTING.md). We want your suggestions | ||
and pull requests! | ||
|
||
A list of node-native2ascii contributors can be found in | ||
[AUTHORS.md](https://github.com/NotNinja/node-native2ascii/blob/master/AUTHORS.md). | ||
|
||
## License | ||
|
||
See [LICENSE.md](https://github.com/NotNinja/node-native2ascii/raw/master/LICENSE.md) for more information on our MIT | ||
license. | ||
|
||
[![Copyright !ninja](https://cdn.rawgit.com/NotNinja/branding/master/assets/copyright/base/not-ninja-copyright-186x25.png)](https://not.ninja) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": "../.eslintrc.json", | ||
"rules": { | ||
"no-process-exit": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env node | ||
|
||
/* | ||
* Copyright (C) 2017 Alasdair Mercer, !ninja | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const CLI = require('../src/cli'); | ||
|
||
(async() => { | ||
const cli = new CLI(); | ||
|
||
try { | ||
await cli.parse(process.argv); | ||
} catch (e) { | ||
cli.error(`native2ascii failed: ${e.stack}`); | ||
|
||
process.exit(1); | ||
} | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "node-native2ascii", | ||
"version": "0.1.0", | ||
"description": "Node.js implementation of Java's Native-to-ASCII Converter", | ||
"homepage": "https://github.com/NotNinja/node-native2ascii", | ||
"bugs": { | ||
"url": "https://github.com/NotNinja/node-native2ascii/issues" | ||
}, | ||
"author": { | ||
"name": "Alasdair Mercer", | ||
"email": "mercer.alasdair@gmail.com", | ||
"url": "https://not.ninja" | ||
}, | ||
"license": "MIT", | ||
"keywords": [ | ||
"native", | ||
"ascii", | ||
"converter", | ||
"unicode", | ||
"escape", | ||
"unescape" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/NotNinja/node-native2ascii.git" | ||
}, | ||
"dependencies": { | ||
"commander": "^2.12.2", | ||
"debug": "^3.1.0", | ||
"get-stdin": "^5.0.1", | ||
"glob": "^7.1.2", | ||
"iconv-lite": "^0.4.19" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.1.2", | ||
"eslint": "^4.12.1", | ||
"eslint-config-notninja": "^0.2.3", | ||
"mocha": "^4.0.1" | ||
}, | ||
"bin": { | ||
"native2ascii": "bin/native2ascii" | ||
}, | ||
"main": "src/native2ascii.js", | ||
"scripts": { | ||
"pretest": "eslint \"bin/native2ascii\" \"src/**/*.js\" \"test/**/*.js\"" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright (C) 2017 Alasdair Mercer, !ninja | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// TODO: Complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2017 Alasdair Mercer, !ninja | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// TODO: Complete | ||
|
||
const { escape, unescape } = require('./unicode'); | ||
|
||
// TODO: Document | ||
function native2ascii(str, options) { | ||
// TODO: Complete | ||
} | ||
|
||
module.exports = native2ascii; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (C) 2017 Alasdair Mercer, !ninja | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
// TODO: Complete | ||
|
||
// TODO: Document | ||
function escape(str) { | ||
// TODO: Complete | ||
} | ||
|
||
module.exports = escape; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (C) 2017 Alasdair Mercer, !ninja | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const escape = require('./escape'); | ||
const unescape = require('./unescape'); | ||
|
||
module.exports = { | ||
escape, | ||
unescape | ||
}; |
Oops, something went wrong.