befuddle 0.1.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 49

befuddle

Obfuscate JSON.

Disclaimer: This is not an official Google or Dart project.

Usage

Befuddle is a simple application and library that is meant to replace representative sets of JSON data (i.e. from a real backend server) with another like-set of data. Befuddle does the following by default:

  • Replaces numbers with similar (random) numbers.
  • Replaces booleans with a random true or false value.
  • Replaces strings with similar (random) strings.
  • Replaces arrays with similar lists, with elements replaced recursively.

For maps (objects), values are replaced recursively similar to the rules above.

However, for keys (properties), it is guaranteed that the randomly generated string is stable for the entire document:

$ befuddle '[{"name": "A"}, {"name": "B"}, {"name": "C"}]'
> [{"0wUc":"u"},{"0wUc":"y"},{"0wUc":"o"}]

This means you could tweak an existing reader/parser to look for 0wUc instead of name, for example.

In future versions of befuddle, it may be possible to emit a symbol map to help with tooling.

From Pub

If you're a Dart user, you can install befuddle globally:

$ pub global activate befuddle
$ befuddle '[{"name": "A"}, {"name": "B"}]'

Or add it to your pubspec:

dependencies:
  befuddle: ^0.1.0

... and use it programatically:

import 'package:befuddle/befuddle.dart';

void main(List<String> args) {
  print(befuddle(args.first));
}

0.1.0

  • Initial commit.

Use this package as an executable

1. Install it

You can install the package from the command line:


$ pub global activate befuddle

2. Use it

The package has the following executables:


$ befuddle

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  befuddle: "^0.1.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:befuddle/befuddle.dart';
  
Version Uploaded Documentation Archive
0.1.0 Oct 21, 2017 Go to the documentation of befuddle 0.1.0 Download befuddle 0.1.0 archive

Analysis

We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
0 / 100
Health:
Code health derived from static analysis. [more]
97 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
49
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:befuddle/befuddle.dart.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use befuddle.dart.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Strong-mode analysis of lib/befuddle.dart gave the following hint:

    line: 29 col: 12
    'JSON' is deprecated and shouldn't be used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <2.0.0
args ^1.0.0 1.4.3
collection ^1.8.0 1.14.10
Dev dependencies
test ^0.12.0