JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 38294
  • Score
    100M100P100Q201786F
  • License MIT

asr2js and js2asr converter android string resource utils

Package Exports

  • android-string-resource
  • android-string-resource/asr2js
  • android-string-resource/js2asr

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (android-string-resource) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

travis npm

Download

The source is available for download from GitHub. Alternatively, you can install using npm:

npm install --save android-string-resource

You can then require() android-string-resource as normal:

const android-string-resource = require('android-string-resource');

Or you can direclty require() its functions:

const asr2js = require('android-string-resource/asr2js');

Usage

const xml = `<resources>
  <string name="key1">Hello</string>
  <string name="key2">An application to manipulate and process asr documents</string>
  <string name="key.nested">asr Data Manager</string>
</resources>`;

const js = {
  "key1": "Hello",
  "key2": "An application to manipulate and process asr documents",
  "key.nested": "asr Data Manager"
};

const asr2js = require('android-string-resource/asr2js');
asr2js(xml, (err, res) => {
  // res is like js
});

const js2asr = require('android-string-resource/js2asr');
js2asr(js, (err, res) => {
  // res is like xml
});