@@ -1872,7 +1872,7 @@ function DSHttpAdapterProvider() {
1872
1872
module . exports = DSHttpAdapterProvider ;
1873
1873
1874
1874
} , { } ] , 37 :[ function ( require , module , exports ) {
1875
- /**
1875
+ /*!
1876
1876
* @doc function
1877
1877
* @id DSLocalStorageAdapterProvider
1878
1878
* @name DSLocalStorageAdapterProvider
@@ -2021,6 +2021,31 @@ function DSLocalStorageAdapterProvider() {
2021
2021
* @name create
2022
2022
* @description
2023
2023
* Create an entity in `localStorage`. You must generate the primary key and include it in the `attrs` object.
2024
+ *
2025
+ * ## Signature:
2026
+ * ```js
2027
+ * DSLocalStorageAdapter.create(resourceConfig, attrs[, options])
2028
+ * ```
2029
+ *
2030
+ * ## Example:
2031
+ * ```js
2032
+ * DS.create('user', {
2033
+ * id: 1,
2034
+ * name: 'john'
2035
+ * }, {
2036
+ * adapter: 'DSLocalStorageAdapter'
2037
+ * }).then(function (user) {
2038
+ * user; // { id: 1, name: 'john' }
2039
+ * });
2040
+ * ```
2041
+ *
2042
+ * @param {object } resourceConfig DS resource definition object:
2043
+ * @param {object } attrs Attributes to create in localStorage.
2044
+ * @param {object= } options Optional configuration. Properties:
2045
+ *
2046
+ * - `{string=}` - `baseUrl` - Base path to use.
2047
+ *
2048
+ * @returns {Promise } Promise.
2024
2049
*/
2025
2050
create : function ( resourceConfig , attrs , options ) {
2026
2051
if ( ! ( resourceConfig . idAttribute in attrs ) ) {
@@ -2048,7 +2073,7 @@ function DSLocalStorageAdapterProvider() {
2048
2073
* ## Example:
2049
2074
* ```js
2050
2075
* DS.update('user', 5, {
2051
- * name: ''
2076
+ * name: 'john '
2052
2077
* }, {
2053
2078
* adapter: 'DSLocalStorageAdapter'
2054
2079
* }).then(function (user) {
0 commit comments