{"id":17048693,"url":"https://github.com/neocotic/node-native2ascii","last_synced_at":"2025-04-12T16:12:44.146Z","repository":{"id":65424695,"uuid":"113198927","full_name":"neocotic/node-native2ascii","owner":"neocotic","description":"Node.js implementation of Java's Native-to-ASCII Converter","archived":false,"fork":false,"pushed_at":"2018-12-04T20:33:25.000Z","size":327,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T10:36:29.600Z","etag":null,"topics":["ascii","converter","escape","javascript","nodejs","unescape","unicode"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neocotic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-05T15:24:58.000Z","updated_at":"2024-07-25T05:22:57.000Z","dependencies_parsed_at":"2023-01-23T10:55:22.922Z","dependency_job_id":null,"html_url":"https://github.com/neocotic/node-native2ascii","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"b04bfdebf806b7d3d96195d0af875325c1ed4634"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neocotic%2Fnode-native2ascii","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neocotic%2Fnode-native2ascii/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neocotic%2Fnode-native2ascii/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neocotic%2Fnode-native2ascii/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neocotic","download_url":"https://codeload.github.com/neocotic/node-native2ascii/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248594139,"owners_count":21130313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ascii","converter","escape","javascript","nodejs","unescape","unicode"],"created_at":"2024-10-14T09:52:46.857Z","updated_at":"2025-04-12T16:12:44.121Z","avatar_url":"https://github.com/neocotic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"                      888    d8b                    .d8888b.                             d8b d8b\n                      888    Y8P                   d88P  Y88b                            Y8P Y8P\n                      888                                 888\n    88888b.   8888b.  888888 888 888  888  .d88b.       .d88P  8888b.  .d8888b   .d8888b 888 888\n    888 \"88b     \"88b 888    888 888  888 d8P  Y8b  .od888P\"      \"88b 88K      d88P\"    888 888\n    888  888 .d888888 888    888 Y88  88P 88888888 d88P\"      .d888888 \"Y8888b. 888      888 888\n    888  888 888  888 Y88b.  888  Y8bd8P  Y8b.     888\"       888  888      X88 Y88b.    888 888\n    888  888 \"Y888888  \"Y888 888   Y88P    \"Y8888  888888888  \"Y888888  88888P'  \"Y8888P 888 888\n\n[node-native2ascii](https://github.com/neocotic/node-native2ascii) is a [Node.js](https://nodejs.org) implementation of\nJava's Native-to-ASCII Converter.\n\n[![Build Status](https://img.shields.io/travis/neocotic/node-native2ascii/develop.svg?style=flat-square)](https://travis-ci.org/neocotic/node-native2ascii)\n[![Coverage](https://img.shields.io/codecov/c/github/neocotic/node-native2ascii/develop.svg?style=flat-square)](https://codecov.io/gh/neocotic/node-native2ascii)\n[![Dependency Status](https://img.shields.io/david/neocotic/node-native2ascii.svg?style=flat-square)](https://david-dm.org/neocotic/node-native2ascii)\n[![Dev Dependency Status](https://img.shields.io/david/dev/neocotic/node-native2ascii.svg?style=flat-square)](https://david-dm.org/neocotic/node-native2ascii?type=dev)\n[![License](https://img.shields.io/npm/l/node-native2ascii.svg?style=flat-square)](https://github.com/neocotic/node-native2ascii/blob/master/LICENSE.md)\n[![Release](https://img.shields.io/npm/v/node-native2ascii.svg?style=flat-square)](https://www.npmjs.com/package/node-native2ascii)\n\n* [Install](#install)\n* [CLI](#cli)\n* [API](#api)\n* [Bugs](#bugs)\n* [Contributors](#contributors)\n* [License](#license)\n\n## Install\n\nInstall using `npm`:\n\n``` bash\n$ npm install --save node-native2ascii\n```\n\nYou'll need to have at least [Node.js](https://nodejs.org) 8 or newer.\n\nIf you want to use the command line interface you'll most likely want to install it globally so that you can run\n`native2ascii` from anywhere:\n\n``` bash\n$ npm install --global node-native2ascii\n```\n\n## CLI\n\n    Usage: native2ascii [options] [inputfile] [outputfile]\n\n    Options:\n      -e, --encoding \u003cencoding\u003e  specify encoding to be used by the conversion procedure\n      -r, --reverse              perform reverse operation\n      -V, --version              output the version number\n      -h, --help                 output usage information\n\nConverts a file that is encoded to any character encoding that is\n[supported by Node.js](https://nodejs.org/dist/latest-v8.x/docs/api/buffer.html#buffer_buffers_and_character_encodings)\n(which can be controlled via the `encoding` command line option and defaults to `utf8`) to a file encoded in ASCII,\nusing Unicode escapes (\"\\uxxxx\" notation) for all characters that are not part of the ASCII character set.\n\nThis command is useful for properties files containing characters not in ISO-8859-1 character sets.\n\nA reverse conversion can be performed by passing the `reverse` command line option.\n\nIf the `outputfile` command line argument is omitted, standard output is used for output. If, in addition, the\n`inputfile` command line argument is omitted, standard input is used for input.\n\n### Examples\n\nConverts a UTF-8 encoded file into an file encoding in ASCII, Unicode escaping characters not in the ASCII character\nset:\n\n``` bash\n# Using file command line arguments:\n$ native2ascii utf8.properties ascii.properties\n# Using STDIN and STDOUT:\n$ cat utf8.properties | native2ascii \u003e ascii.properties\n```\n\nConverts a ASCII encoded file into a file encoded in UTF-8, unescaping any Unicode escapes:\n\n``` bash\n# Using file command line arguments:\n$ native2ascii --reverse ascii.properties utf8.properties\n# Using STDIN and STDOUT:\n$ cat ascii.properties | native2ascii --reverse \u003e utf8.properties\n```\n\n## API\n\n### native2ascii(input[, options])\n\nConverts the specified `input` so that it can be encoded in ASCII by using Unicode escapes (\"\\uxxxx\" notation) for all\ncharacters that are not part of the ASCII character set.\n\nThis function is useful for properties files containing characters not in ISO-8859-1 character sets.\n\nA reverse conversion can be performed by enabling the `reverse` option.\n\n#### Options\n\n| Option    | Description                      | Default |\n| --------- | -------------------------------- | ------- |\n| `reverse` | Whether to reverse the operation | `false` |\n\n#### Examples\n\nUnicode escape characters not in the ASCII character set so that they can be safely written encoded into ASCII:\n\n``` javascript\nconst native2ascii = require('node-native2ascii');\n\nnative2ascii('I ♥ native2ascii!');\n//=\u003e \"I \\\\u2665 native2ascii!\"\n```\n\nThese can be later unescaped by reversing the operation:\n\n``` javascript\nconst native2ascii = require('node-native2ascii');\n\nnative2ascii('I \\\\u2665 native2ascii!', { reverse: true });\n//=\u003e \"I ♥ native2ascii!\"\n```\n\n## Bugs\n\nIf you have any problems with node-native2ascii or would like to see changes currently in development you can do so\n[here](https://github.com/neocotic/node-native2ascii/issues).\n\n## Contributors\n\nIf you want to contribute, you're a legend! Information on how you can do so can be found in\n[CONTRIBUTING.md](https://github.com/neocotic/node-native2ascii/blob/master/CONTRIBUTING.md). We want your suggestions\nand pull requests!\n\nA list of node-native2ascii contributors can be found in\n[AUTHORS.md](https://github.com/neocotic/node-native2ascii/blob/master/AUTHORS.md).\n\n## License\n\nCopyright © 2018 Alasdair Mercer\n\nSee [LICENSE.md](https://github.com/neocotic/node-native2ascii/raw/master/LICENSE.md) for more information on our MIT\nlicense.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneocotic%2Fnode-native2ascii","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneocotic%2Fnode-native2ascii","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneocotic%2Fnode-native2ascii/lists"}