code-stringify
Advanced tools
Comparing version 1.2.2 to 1.2.3
{ | ||
"name": "code-stringify", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "code-stringify is node.js module that converts JavaScript variables into source codes. Unlike JSON.stringify, code-stringify converts things into strings of code, not JSON.", | ||
@@ -11,6 +11,10 @@ "main": "index.js", | ||
"strinify", | ||
"json-strinify", | ||
"json-stringify", | ||
"codify", | ||
"code-generator", | ||
"code" | ||
"code", | ||
"javascript", | ||
"serialization", | ||
"serialize", | ||
"json" | ||
], | ||
@@ -17,0 +21,0 @@ "repository": { |
@@ -9,2 +9,8 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-code-stringify.svg?branch=master)](https://travis-ci.org/kaelzhang/node-code-stringify) | ||
Supports: | ||
- Regular expressions | ||
- Functions | ||
- Arrays | ||
## Installation | ||
@@ -21,5 +27,5 @@ | ||
const obj = { | ||
0: 1, | ||
a: function(n){return n;}, | ||
b: 1, | ||
'0': 1, | ||
'a': function(n){return n;}, | ||
'b': 1, | ||
'c-d': 3 | ||
@@ -26,0 +32,0 @@ } |
@@ -9,5 +9,5 @@ 'use strict' | ||
var obj = { | ||
0: 1, | ||
'0': 1, | ||
2: 1, | ||
a: 1, | ||
'a': 1, | ||
bc: '2', | ||
@@ -62,3 +62,3 @@ def: true, | ||
it('with replacer', function () { | ||
let value = [1, 2, 3] | ||
var value = [1, 2, 3] | ||
expect(code(value, function (i, v) { | ||
@@ -65,0 +65,0 @@ return i === '' |
14883
129