Git Product home page Git Product logo

json.sortify's People

Contributors

marekpalenik avatar thomasr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

json.sortify's Issues

Dependent on npm: '~1.0.20'

This package is dependent on npm: '~1.0.20' Which I think nobody has, I guess it should be >1.0.20? also because node must be greater as 4 so this gives warnings while running npm 8:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>=4.0.0', npm: '~1.0.20' },
npm WARN EBADENGINE current: { node: 'v16.18.0', npm: '8.19.2' }
npm WARN EBADENGINE }

Uncaught ReferenceError: definition is not defined

Hello,

I'm getting the error

JSON.sortify.js:1 Uncaught ReferenceError: definition is not defined

on latest version. I hadn't the same problem on earlier version.

Do I need to do anything different (I seems to comply with the docs, though) or something went wrong with the build?

Thank you!

Andrea

Improve HTML tests

Currently, there is a very basic test in smoke.html, but that should be automated.

Unexpected token error

Hey there,

I'm just wondering if there would be some way you could change the lib to be compiled down to an earlier js version. Currently uglify is choking on the ()=> syntax:

static/js/main.39077179.js from UglifyJs
Unexpected token: operator (>) [./~/json.sortify/lib/index.js:29,0][static/js/main.39077179.js:127447,20]

Thank you!

Possible to specify order of properties?

Let's say I have the following JSON object:

{
"name" : "John",
"age" : 55,
"sex" : "M"
}

using sortify, of course it will sort them by alphabetical order. However, what if I always wanted the JSON to be exported in the format as above? Is there a way to pass in similar to a whitelist--but have the whitelist retain the order as I enter it?

For example to replicate structure above, the call would be:

JSON.sortify(data, ['name', 'age', 'sex']);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.