Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
json-future
Advanced tools
Modern JSON interface. propositions for ECMAScript 7.
JSON Future is based into a set of cool libraries to handle JSON, but some of this libraries uses promises or callback style. This library adds an extra layer to call these libraries uniformly.
npm install json-future --save
const jsonFuture = require('json-future')
Don't be afraid to replace for the default JSON
object. The library is specially designed for be compatible and don't break your code:
JSON = require('json-future')
Also you can do this action using the register
helper:
require('json-future/register')
In async
methods, if you don't provide a callback for node style, then the method return a Promise
.
Creates the string
version of the input.
Creates the object
version of the input.
Returns the parsed JSON.
Stringify and write JSON to a file atomically.
Type: string
, number
Default: \t
Indentation as a string or number of spaces.
Pass in null
for no formatting.
Type: boolean
, function
Default: false
Sort the keys recursively.
Optionally pass in a compare
function.
Type: function
Passed into JSON.stringify
.
Type: number
Default 438
(0666 in octal)
Mode used when writing the file.
MIT © Kiko Beats
FAQs
Unbelievable and Modern JSON interface.
The npm package json-future receives a total of 10,361 weekly downloads. As such, json-future popularity was classified as popular.
We found that json-future demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.