node_interop 1.0.0-dev.2.0 copy "node_interop: ^1.0.0-dev.2.0" to clipboard
node_interop: ^1.0.0-dev.2.0 copied to clipboard

outdatedDart 1 only

Node.js API bindings and utilities for Dart.

example/main.dart

// Copyright (c) 2018, Anatoly Pulyaevskiy. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'dart:convert';

import 'package:node_interop/fs.dart';
import 'package:node_interop/node.dart';

/// Simple example of reading contents of current working directory and
/// printing out as nicely indented JSON.
void main() {
  final List<String> contents = fs.readdirSync(process.cwd());
  final json = new JsonEncoder.withIndent('  ');
  print(json.convert(contents));
}
47
likes
0
pub points
95%
popularity

Publisher

unverified uploader

Node.js API bindings and utilities for Dart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

js

More

Packages that depend on node_interop