
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
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.
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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.