Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "ba64", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A small npm module for saving base 64 encoded images to your file system.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,16 +19,16 @@ # ba64 | ||
```js | ||
var ba64 = require("ba64"), | ||
data_url = "data:image/jpeg;base64,[Base64 encoded image goes here]"; | ||
var ba64 = require("ba64"), | ||
data_url = "data:image/jpeg;base64,[Base64 encoded image goes here]"; | ||
// Save the image synchronously. | ||
ba64.writeImageSync("myimage", data_url); // Saves myimage.jpeg. | ||
// Save the image synchronously. | ||
ba64.writeImageSync("myimage", data_url); // Saves myimage.jpeg. | ||
// Or save the image asynchronously. | ||
ba64.writeImage("myimage", data_url, function(err){ | ||
if (err) throw err; | ||
// Or save the image asynchronously. | ||
ba64.writeImage("myimage", data_url, function(err){ | ||
if (err) throw err; | ||
console.log("Image saved successfully"); | ||
console.log("Image saved successfully"); | ||
// do stuff | ||
}); | ||
// do stuff | ||
}); | ||
``` | ||
@@ -35,0 +35,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5294