OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #library('querystring'); |
| 6 #import('node.dart'); |
| 7 |
| 8 // module querystring |
| 9 |
| 10 typedef String QuerystringTranslator(String source); |
| 11 class Querystring { |
| 12 var _qs; |
| 13 Querystring._from(this._qs); |
| 14 String stringify(Map obj, [String sep, String eq]) |
| 15 native "return this._qs.stringify(obj, sep, eq);"; |
| 16 Map<String,Object> parse(String str, [String sep, String eq]) |
| 17 => new _NativeMapPrimitiveValue(_parse(str, sep, eq)); |
| 18 var _parse(String str, String sep, String eq) |
| 19 native "return this._qs.parse(str, sep, eq);"; |
| 20 |
| 21 QuerystringTranslator get escape() |
| 22 native "return this._qs.escape;"; |
| 23 |
| 24 void set escape(QuerystringTranslator t) |
| 25 native "this._qs.escape = t;"; |
| 26 |
| 27 QuerystringTranslator get unescape() |
| 28 native "return this._qs.unescape;"; |
| 29 |
| 30 void set unescape(QuerystringTranslator t) |
| 31 native "this._qs.unescape = t;"; |
| 32 } |
| 33 |
| 34 Querystring get querystring() => new Querystring._from(require('querystring')); |
| 35 |
OLD | NEW |