Welcome to mirror list, hosted at ThFree Co, Russian Federation.

author.yaml « update « test « jju « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4b08bb61b4905625ddf50c56e759878c98f9613a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
input: |
  { "name": "just-a-demo",
    "version": "0.1.2",
    "description": "blahblahblah",
    "main": "test.js",
    "scripts": { "test": "echo \"Error: no test specified\" && exit 1" },
    "author": "John Doe <whoever@google.com>",
    "license": "BSD-2-Clause" }

output: |
  { "name": "just-a-demo",
    "version": "0.1.2",
    "description": "blahblahblah",
    "main": "test.js",
    "scripts": { "test": "echo \"Error: no test specified\" && exit 1" },
    "author": {
      "name": "John Doe",
      "email": "whoever@google.com"
    },
    "license": "BSD-2-Clause" }

test: !!js/function |
  function(jju, input) {
    obj = jju.parse(input)
    obj.author = {
      name: 'John Doe',
      email: 'whoever@google.com',
    }
    return jju.update(input, obj)
  }